Paul Gofman : nsiproxy.sys: Update interface table only if LUID is not found in convert_unix_name_to_luid().
Alexandre Julliard
julliard at winehq.org
Tue May 17 15:37:23 CDT 2022
Module: wine
Branch: master
Commit: 50c27f88e369ef72bd05b68c700b6d3c4695f4e9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=50c27f88e369ef72bd05b68c700b6d3c4695f4e9
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Mon May 16 16:29:04 2022 -0500
nsiproxy.sys: Update interface table only if LUID is not found in convert_unix_name_to_luid().
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/nsiproxy.sys/ndis.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/dlls/nsiproxy.sys/ndis.c b/dlls/nsiproxy.sys/ndis.c
index 9b09756f35c..667d399b0cb 100644
--- a/dlls/nsiproxy.sys/ndis.c
+++ b/dlls/nsiproxy.sys/ndis.c
@@ -615,18 +615,24 @@ BOOL convert_unix_name_to_luid( const char *unix_name, NET_LUID *luid )
{
struct if_entry *entry;
BOOL ret = FALSE;
+ int updated = 0;
pthread_mutex_lock( &if_list_lock );
- update_if_table();
-
- LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
- if (!strcmp( entry->if_unix_name, unix_name ))
+ do
+ {
+ LIST_FOR_EACH_ENTRY( entry, &if_list, struct if_entry, entry )
{
- *luid = entry->if_luid;
- ret = TRUE;
- break;
+ if (!strcmp( entry->if_unix_name, unix_name ))
+ {
+ *luid = entry->if_luid;
+ ret = TRUE;
+ goto done;
+ }
}
+ } while (!updated++ && update_if_table());
+
+done:
pthread_mutex_unlock( &if_list_lock );
return ret;
More information about the wine-cvs
mailing list