[DHCPCSVC]: Revert part of r48215
authorCameron Gutman <aicommander@gmail.com>
Sun, 1 Aug 2010 20:34:10 +0000 (20:34 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sun, 1 Aug 2010 20:34:10 +0000 (20:34 +0000)
svn path=/trunk/; revision=48399

reactos/dll/win32/dhcpcsvc/dhcp/adapter.c

index ffa176f..7e22a3b 100644 (file)
@@ -102,8 +102,7 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
         "SYSTEM\\CurrentControlSet\\Control\\Class\\"
         "{4D36E972-E325-11CE-BFC1-08002BE10318}";
     PCHAR TargetKeyNameStart =
-        "SYSTEM\\CurrentControlSet\\Services\\";
-    PCHAR TargetKeyNameEnd = "\\Parameters\\Tcpip";
+        "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces\\";
     PCHAR TargetKeyName = NULL;
     PCHAR *EnumKeysLinkage = GetSubkeyNames( EnumKeyName, "\\Linkage" );
     PCHAR *EnumKeysTop     = GetSubkeyNames( EnumKeyName, "" );
@@ -125,10 +124,10 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
             !strcmp( RootDevice, Adapter->DhclientInfo.name ) ) {
             TargetKeyName =
                 (CHAR*) malloc( strlen( TargetKeyNameStart ) +
-                        strlen( RootDevice ) + strlen( TargetKeyNameEnd ) + 1);
+                        strlen( RootDevice ) + 1);
             if( !TargetKeyName ) goto cleanup;
-            sprintf( TargetKeyName, "%s%s%s",
-                     TargetKeyNameStart, RootDevice, TargetKeyNameEnd );
+            sprintf( TargetKeyName, "%s%s",
+                     TargetKeyNameStart, RootDevice );
             Error = RegCreateKeyExA( HKEY_LOCAL_MACHINE, TargetKeyName, 0, NULL, 0, KEY_READ, NULL, &OutKey, NULL );
             break;
         } else {