[ros-diffs] [cgutman] 54945: [DHCPCSVC] - Adapt the reconnect hack to also enable DHCP when transitioning from static configuration to DHCP enabled via netcfgx

cgutman at svn.reactos.org cgutman at svn.reactos.org
Fri Jan 13 22:56:23 UTC 2012


Author: cgutman
Date: Fri Jan 13 22:56:22 2012
New Revision: 54945

URL: http://svn.reactos.org/svn/reactos?rev=54945&view=rev
Log:
[DHCPCSVC]
- Adapt the reconnect hack to also enable DHCP when transitioning from static configuration to DHCP enabled via netcfgx

Modified:
    branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c

Modified: branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c
URL: http://svn.reactos.org/svn/reactos/branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c?rev=54945&r1=54944&r2=54945&view=diff
==============================================================================
--- branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] (original)
+++ branches/wlan-bringup/dll/win32/dhcpcsvc/dhcp/adapter.c [iso-8859-1] Fri Jan 13 22:56:22 2012
@@ -210,10 +210,11 @@
 
     proto = find_protocol_by_adapter(&Adapter->DhclientInfo);
 
-    if (!proto)
+    if (Adapter->DhclientInfo.client->state == S_BOUND && !proto)
         return FALSE;
 
-    if (Adapter->DhclientInfo.client->state != S_BOUND)
+    if (Adapter->DhclientInfo.client->state != S_BOUND &&
+        Adapter->DhclientInfo.client->state != S_STATIC)
         return FALSE;
     
     ApiUnlock();
@@ -331,7 +332,8 @@
                     {
                         /* This handles a disconnect/reconnect */
 
-                        remove_protocol(proto);
+                        if (proto)
+                            remove_protocol(proto);
                         Adapter->DhclientInfo.client->state = S_INIT;
 
                         /* These are already invalid since the media state change */




More information about the Ros-diffs mailing list