Don't try to discover if we didn't find any interfaces we like. When we get
authorArt Yerkes <art.yerkes@gmail.com>
Sat, 23 Apr 2005 00:40:44 +0000 (00:40 +0000)
committerArt Yerkes <art.yerkes@gmail.com>
Sat, 23 Apr 2005 00:40:44 +0000 (00:40 +0000)
PnP, we'll need to do discover when the first interface appears.

svn path=/trunk/; revision=14751

reactos/subsys/system/dhcp/dhclient.c

index 13462ec..ee9649e 100644 (file)
@@ -161,12 +161,16 @@ main(int argc, char *argv[])
 
         DH_DbgPrint(MID_TRACE,("Discover Interfaces\n"));
 
-       /* set up the interface */
-       discover_interfaces(ifi);
-
-        DH_DbgPrint
-            (MID_TRACE,
-             ("Setting init state and restarting interface %p\n",ifi));
+        /* If no adapters were found, just idle for now ... If any show up,
+         * then we'll start it later */
+        if( ifi ) {
+            /* set up the interface */
+            discover_interfaces(ifi);
+
+            DH_DbgPrint
+                (MID_TRACE,
+                 ("Setting init state and restarting interface %p\n",ifi));
+        }
 
        bootp_packet_handler = do_packet;