dlls/iphlpapi/iphlpapi_main.c -- initialise field in pAdapterInfo

Guido Barzini gnb10 at gnb10.uklinux.net
Mon Dec 3 15:58:05 CST 2007


 The pAdapterInfo->AddressLength field needs to be set to the available
space before getInterfacePhysicalByIndex is called. This used to be done, but 
the initialisation was lost during some recent changes, making retrieval of 
the physical address fail (see http://bugs.winehq.org/show_bug.cgi?id=10657).
This one-line patch restores the previous behaviour.

Guido Barzini

Changelog:
 Restore lost initialisation of ptr->AddressLength in GetAdaptersInfo

--- dlls/iphlpapi/iphlpapi_main.c   2007-11-30 17:38:15.000000000 +0000
+++ dlls/iphlpapi/iphlpapi_main.c       2007-12-03 21:46:32.000000000 +0000
@@ -735,6 +735,7 @@

               /* on Win98 this is left empty, but whatever */
               getInterfaceNameByIndex(table->indexes[ndx], ptr->AdapterName);
+              ptr->AddressLength = sizeof(ptr->Address);
               getInterfacePhysicalByIndex(table->indexes[ndx],
                &ptr->AddressLength, ptr->Address, &ptr->Type);
               ptr->Index = table->indexes[ndx];



More information about the wine-patches mailing list