[ros-diffs] [cgutman] 35956: - Patch by Michael Martin (aka bugboy) <martinmnet at hotmail dot com> - changed dhcp to write nameserver to dhcpnameserver registry key vice nameserver - changed iphlpapi to return dhcpnameserver if nameserver is empty - set NameServer to empty string in nettcpip.inf - see bug 2392

cgutman at svn.reactos.org cgutman at svn.reactos.org
Fri Sep 5 03:00:33 CEST 2008


Author: cgutman
Date: Thu Sep  4 20:00:32 2008
New Revision: 35956

URL: http://svn.reactos.org/svn/reactos?rev=35956&view=rev
Log:
 - Patch by Michael Martin (aka bugboy) <martinmnet at hotmail dot com>
 - changed dhcp to write nameserver to dhcpnameserver registry key vice nameserver
 - changed iphlpapi to return dhcpnameserver if nameserver is empty
 - set NameServer to empty string in nettcpip.inf
 - see bug 2392

Modified:
    trunk/reactos/base/services/dhcp/dhclient.c
    trunk/reactos/dll/win32/iphlpapi/resinfo_reactos.c
    trunk/reactos/media/inf/nettcpip.inf

Modified: trunk/reactos/base/services/dhcp/dhclient.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/dhcp/dhclient.c?rev=35956&r1=35955&r2=35956&view=diff
==============================================================================
--- trunk/reactos/base/services/dhcp/dhclient.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/dhcp/dhclient.c [iso-8859-1] Thu Sep  4 20:00:32 2008
@@ -476,15 +476,10 @@
                 if( i != addrs-1 ) strcat( nsbuf, "," );
             }
 
-            DH_DbgPrint(MID_TRACE,("Setting Nameservers: %s\n", nsbuf));
-
-            /* XXX Fixme: I think this may be wrong and that we might have
-             * a problem somewhere else (in iphlpapi for example).
-             *
-             * Recheck the +1 below.
-             */
-            RegSetValueEx( RegKey, "NameServer", 0, REG_SZ,
-                           (LPBYTE)nsbuf, strlen(nsbuf) + 1 );
+            DH_DbgPrint(MID_TRACE,("Setting DhcpNameserver: %s\n", nsbuf));
+
+            RegSetValueEx( RegKey, "DhcpNameServer", 0, REG_SZ,
+                           (LPBYTE)nsbuf, strlen(nsbuf) + 1);
 
             free( nsbuf );
         }
@@ -2097,4 +2092,4 @@
 		dispatch_imsg(fd);
 	}
 }
-#endif
+#endif

Modified: trunk/reactos/dll/win32/iphlpapi/resinfo_reactos.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/resinfo_reactos.c?rev=35956&r1=35955&r2=35956&view=diff
==============================================================================
--- trunk/reactos/dll/win32/iphlpapi/resinfo_reactos.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iphlpapi/resinfo_reactos.c [iso-8859-1] Thu Sep  4 20:00:32 2008
@@ -224,6 +224,14 @@
     }
 
     Str = QueryRegistryValueString( hKey, L"NameServer" );
+
+    /* If NameServer is empty */
+    if (*Str == L'\0')
+    {
+        /* Then use DhcpNameServer */
+        Str = QueryRegistryValueString( hKey, L"DhcpNameServer" );
+    }
+
     ExtraServer = Str ? 1 : 0;
 
     ServerCount += ExtraServer;
@@ -283,4 +291,4 @@
 
 VOID disposeResInfo( PIPHLP_RES_INFO InfoPtr ) {
     RtlFreeHeap( GetProcessHeap(), 0, InfoPtr );
-}
+}

Modified: trunk/reactos/media/inf/nettcpip.inf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/nettcpip.inf?rev=35956&r1=35955&r2=35956&view=diff
==============================================================================
Binary files - no diff available.



More information about the Ros-diffs mailing list