summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-05-25 21:11:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-05-25 21:11:28 +0000
commitfcc3e2ca3484f16865b2d22bb0ea3df0f1dd6c9f (patch)
tree883e1c1e8a171e1f2efcc721ce2a8ee12646ae4c
parentc25da519138797ff25a8e85d832665fd2b2ed21f (diff)
downloadgnurl-fcc3e2ca3484f16865b2d22bb0ea3df0f1dd6c9f.tar.gz
gnurl-fcc3e2ca3484f16865b2d22bb0ea3df0f1dd6c9f.tar.bz2
gnurl-fcc3e2ca3484f16865b2d22bb0ea3df0f1dd6c9f.zip
Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows
that could cause it to return a bad return code.
-rw-r--r--ares/CHANGES4
-rw-r--r--ares/ares_init.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/ares/CHANGES b/ares/CHANGES
index 1755907b8..b4580c773 100644
--- a/ares/CHANGES
+++ b/ares/CHANGES
@@ -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
diff --git a/ares/ares_init.c b/ares/ares_init.c
index 552f51f48..bfe6b904c 100644
--- a/ares/ares_init.c
+++ b/ares/ares_init.c
@@ -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__)