Fix some crash bugs when initializing evdns

svn:r1443
This commit is contained in:
Nick Mathewson 2009-10-14 00:46:40 +00:00
parent e6b747c34a
commit fc83ca3c70
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ Changes in 2.0.3-alpha:
o Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
o New event_base_got_exit() and event_base_got_break() functions to tell whether an event loop exited because of an event_base_loopexit() or an event_base_loopbreak(). Patch from Ka-Hing Cheung.
o When adding or deleting an event from a non-main thread, only wake up the main thread when its behavior actually needs to change.
o Fix some bugs when using the old evdns interfaces to initialize the evdns module.
Changes in 2.0.2-alpha:

View File

@ -3228,6 +3228,8 @@ evdns_base_set_option_impl(struct evdns_base *base,
int
evdns_set_option(const char *option, const char *val, int flags)
{
if (!current_base)
current_base = evdns_base_new(NULL, 0);
return evdns_base_set_option(current_base, option, val, flags);
}
@ -3355,6 +3357,8 @@ out1:
int
evdns_resolv_conf_parse(int flags, const char *const filename) {
if (!current_base)
current_base = evdns_base_new(NULL, 0);
return evdns_base_resolv_conf_parse(current_base, flags, filename);
}
@ -3574,7 +3578,6 @@ evdns_config_windows_nameservers(void)
} else {
return evdns_base_config_windows_nameservers(current_base);
}
}
#endif