- Joshua Kwan fixed the init routine to fill in the defaults for stuff that

fails to get inited by other means. This fixes a case of when the c-ares
  init fails when internet access is fone.
This commit is contained in:
Daniel Stenberg 2009-08-03 11:29:17 +00:00
parent 9d03dd7fb8
commit f0dbdcff9d
3 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,10 @@
Changelog for the c-ares project Changelog for the c-ares project
* 3 Aug 2009 (Daniel Stenberg)
- Joshua Kwan fixed the init routine to fill in the defaults for stuff that
fails to get inited by other means. This fixes a case of when the c-ares
init fails when internet access is fone.
* 14 Jul 2009 (Guenter Knauf) * 14 Jul 2009 (Guenter Knauf)
- renamed generated config.h to ares_config.h to avoid any future clashes - renamed generated config.h to ares_config.h to avoid any future clashes
with config.h from other projects. with config.h from other projects.

View File

@ -16,9 +16,10 @@ Fixed:
ARES_EBADNAME if the name in the response failed to decode ARES_EBADNAME if the name in the response failed to decode
o only expose/export symbols starting with 'ares_' o only expose/export symbols starting with 'ares_'
o fix \Device\TCP handle leaks triggered by buggy iphlpapi.dll o fix \Device\TCP handle leaks triggered by buggy iphlpapi.dll
o init without internet gone no longer fails
Thanks go to these friendly people for their efforts and contributions: Thanks go to these friendly people for their efforts and contributions:
Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny Phil Blundell, Japheth Cleaver, Yang Tse, Gregor Jasny, Joshua Kwan
Have fun! Have fun!

View File

@ -201,12 +201,15 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n", DEBUGF(fprintf(stderr, "Error: init_by_resolv_conf failed: %s\n",
ares_strerror(status))); ares_strerror(status)));
} }
if (status == ARES_SUCCESS) {
status = init_by_defaults(channel); /*
if (status != ARES_SUCCESS) * No matter what failed or succeeded, seed defaults to provide
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n", * useful behavior for things that we missed.
ares_strerror(status))); */
} status = init_by_defaults(channel);
if (status != ARES_SUCCESS)
DEBUGF(fprintf(stderr, "Error: init_by_defaults failed: %s\n",
ares_strerror(status)));
/* Generate random key */ /* Generate random key */