nsiproxy.sys: Update interface table only if find_entry_from_{luid|index} fails.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-05-16 15:32:04 -05:00 committed by Alexandre Julliard
parent e55515bf5b
commit 42bf766866
1 changed files with 15 additions and 9 deletions

View File

@ -495,9 +495,11 @@ static NTSTATUS ifinfo_get_all_parameters( const void *key, UINT key_size, void
pthread_mutex_lock( &if_list_lock );
update_if_table();
entry = find_entry_from_luid( (const NET_LUID *)key );
if (!(entry = find_entry_from_luid( (const NET_LUID *)key )))
{
update_if_table();
entry = find_entry_from_luid( (const NET_LUID *)key );
}
if (entry)
{
ifinfo_fill_entry( entry, NULL, rw_data, dynamic_data, static_data );
@ -557,9 +559,11 @@ static NTSTATUS ifinfo_get_parameter( const void *key, UINT key_size, UINT param
pthread_mutex_lock( &if_list_lock );
update_if_table();
entry = find_entry_from_luid( (const NET_LUID *)key );
if (!(entry = find_entry_from_luid( (const NET_LUID *)key )))
{
update_if_table();
entry = find_entry_from_luid( (const NET_LUID *)key );
}
if (entry)
{
switch (param_type)
@ -591,9 +595,11 @@ static NTSTATUS index_luid_get_parameter( const void *key, UINT key_size, UINT p
pthread_mutex_lock( &if_list_lock );
update_if_table();
entry = find_entry_from_index( *(UINT *)key );
if (!(entry = find_entry_from_index( *(UINT *)key )))
{
update_if_table();
entry = find_entry_from_index( *(UINT *)key );
}
if (entry)
{
*(NET_LUID *)data = entry->if_luid;