]> granicus.if.org Git - curl/commitdiff
Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
authorDaniel Stenberg <daniel@haxx.se>
Fri, 25 May 2007 21:11:28 +0000 (21:11 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 25 May 2007 21:11:28 +0000 (21:11 +0000)
that could cause it to return a bad return code.

ares/CHANGES
ares/ares_init.c

index 1755907b878d39676d78450c95c3a55e5538b649..b4580c77397466c89dff7e4e17529c65d4899770 100644 (file)
@@ -1,5 +1,9 @@
   Changelog for the c-ares project
 
+* May 25 2007
+- Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
+  that could cause it to return a bad return code.
+
 * April 16 2007
 
 - Yang Tse: Provide ares_getopt() command-line parser function as a source
index 552f51f48e859282bdbe4f7949018124e814378b..bfe6b904ca4dfa0fd31817d27b0bab87766844ae 100644 (file)
@@ -555,6 +555,10 @@ DhcpNameServer
 
   if (status == ARES_SUCCESS)
     status = ARES_EOF;
+  else
+    /* Catch the case when all the above checks fail (which happens when there
+       is no network card or the cable is unplugged) */
+    status = ARES_EFILE;
 
 #elif defined(__riscos__)