mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 13:58:58 -04:00
Fix some crash bugs when initializing evdns
svn:r1443
This commit is contained in:
parent
e6b747c34a
commit
fc83ca3c70
@ -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:
|
||||
|
5
evdns.c
5
evdns.c
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user