Author: arty
Date: Fri Aug 22 00:58:56 2008
New Revision: 35523
URL:
http://svn.reactos.org/svn/reactos?rev=35523&view=rev
Log:
Commit bugboy's patch from bug 2392, and remove DeviceDesc, which isn't needed
anymore.
Modified:
trunk/reactos/base/services/dhcp/adapter.c
Modified: trunk/reactos/base/services/dhcp/adapter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/dhcp/adapter…
==============================================================================
--- trunk/reactos/base/services/dhcp/adapter.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/dhcp/adapter.c [iso-8859-1] Fri Aug 22 00:58:56 2008
@@ -108,7 +108,7 @@
PCHAR TargetKeyName = NULL;
PCHAR *EnumKeysLinkage = GetSubkeyNames( EnumKeyName, "\\Linkage" );
PCHAR *EnumKeysTop = GetSubkeyNames( EnumKeyName, "" );
- PCHAR RootDevice = NULL, DriverDesc = NULL;
+ PCHAR RootDevice = NULL;
HKEY EnumKey, OutKey = NULL;
DWORD Error = ERROR_SUCCESS;
@@ -121,12 +121,9 @@
for( i = 0; EnumKeysLinkage[i]; i++ ) {
RootDevice = RegReadString
( EnumKey, EnumKeysLinkage[i], "RootDevice" );
- DriverDesc = RegReadString
- ( EnumKey, EnumKeysTop[i], "DriverDesc" );
-
- if( DriverDesc &&
- RootDevice &&
- !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
+
+ if( RootDevice &&
+ !strcmp( RootDevice, Adapter->DhclientInfo.name ) ) {
TargetKeyName =
(CHAR*) malloc( strlen( TargetKeyNameStart ) +
strlen( RootDevice ) +
@@ -138,13 +135,11 @@
break;
} else {
free( RootDevice ); RootDevice = 0;
- free( DriverDesc ); DriverDesc = 0;
}
}
cleanup:
if( RootDevice ) free( RootDevice );
- if( DriverDesc ) free( DriverDesc );
if( EnumKeysLinkage ) free( EnumKeysLinkage );
if( EnumKeysTop ) free( EnumKeysTop );
if( TargetKeyName ) free( TargetKeyName );