Commit 50c27f88 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

nsiproxy.sys: Update interface table only if LUID is not found in convert_unix_name_to_luid().

parent 1f3c1fdb
...@@ -615,18 +615,24 @@ BOOL convert_unix_name_to_luid( const char *unix_name, NET_LUID *luid ) ...@@ -615,18 +615,24 @@ BOOL convert_unix_name_to_luid( const char *unix_name, NET_LUID *luid )
{ {
struct if_entry *entry; struct if_entry *entry;
BOOL ret = FALSE; BOOL ret = FALSE;
int updated = 0;
pthread_mutex_lock( &if_list_lock ); pthread_mutex_lock( &if_list_lock );
update_if_table(); do
{
LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry ) LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
if (!strcmp( entry->if_unix_name, unix_name ))
{ {
*luid = entry->if_luid; if (!strcmp( entry->if_unix_name, unix_name ))
ret = TRUE; {
break; *luid = entry->if_luid;
ret = TRUE;
goto done;
}
} }
} while (!updated++ && update_if_table());
done:
pthread_mutex_unlock( &if_list_lock ); pthread_mutex_unlock( &if_list_lock );
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment