[ros-diffs] [arty] 14653: Don't set a zero timeout for a lease. Zero here is taken to mean infinite.

arty at svn.reactos.com arty at svn.reactos.com
Sun Apr 17 21:16:40 CEST 2005


Don't set a zero timeout for a lease.  Zero here is taken to mean
infinite.
Modified: trunk/reactos/subsys/system/dhcp/dhclient.c
  _____  

Modified: trunk/reactos/subsys/system/dhcp/dhclient.c
--- trunk/reactos/subsys/system/dhcp/dhclient.c	2005-04-17 18:53:55 UTC
(rev 14652)
+++ trunk/reactos/subsys/system/dhcp/dhclient.c	2005-04-17 19:16:39 UTC
(rev 14653)
@@ -682,7 +682,11 @@

     ip->client->new = NULL;
 
     /* Set up a timeout to start the renewal process. */
-    add_timeout(ip->client->active->renewal, state_bound, ip);
+    /* Timeout of zero means no timeout (some implementations seem to
use
+     * one day).
+     */
+    if( ip->client->active->renewal ) 
+        add_timeout(ip->client->active->renewal, state_bound, ip);
 
     note("bound to %s -- renewal in %d seconds.",
          piaddr(ip->client->active->address),



More information about the Ros-diffs mailing list