From: Paul Gofman pgofman@codeweavers.com
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/nsiproxy.sys/ndis.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c index 929bda9cd90..152e808994e 100644 --- a/dlls/nsiproxy.sys/ndis.c +++ b/dlls/nsiproxy.sys/ndis.c @@ -634,18 +634,24 @@ BOOL convert_luid_to_unix_name( const NET_LUID *luid, const char **unix_name ) { struct if_entry *entry; BOOL ret = FALSE; + int updated = 0;
pthread_mutex_lock( &if_list_lock );
- update_if_table(); + do + { + LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry ) + if (entry->if_luid.Value == luid->Value) + { + *unix_name = entry->if_unix_name; + ret = TRUE; + goto done; + } + update_if_table(); + } + while (!updated++);
- LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry ) - if (entry->if_luid.Value == luid->Value) - { - *unix_name = entry->if_unix_name; - ret = TRUE; - break; - } +done: pthread_mutex_unlock( &if_list_lock );
return ret;