From fcc3e2ca3484f16865b2d22bb0ea3df0f1dd6c9f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 May 2007 21:11:28 +0000 Subject: Ravi Pratap fixed a flaw in the init_by_resolv_conf() function for windows that could cause it to return a bad return code. --- ares/CHANGES | 4 ++++ ares/ares_init.c | 4 ++++ 2 files changed, 8 insertions(+) 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__) -- cgit v1.2.3