Also, I've discovered that evdns needs to be configured with evdns_base_search_add for the dns search domains to work. The standard way on windows seems to be to read these settings from the registry.
I can work on a patch for this if anyone is interested. I think it should do this by default when you create the evdns and pass "1" as the initialize argument. /Juan From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: den 4 september 2015 13:20 To: [email protected] Subject: [Libevent-users] evdns doesn't load hosts file on windows Hi, This code skips loading the hosts file when the call to getnetworkparams succeds. Doesn't look right to me... Regards, Juan int evdns_base_config_windows_nameservers(struct evdns_base *base) { int r; char *fname; if (base == NULL) base = current_base; if (base == NULL) return -1; EVDNS_LOCK(base); if (load_nameservers_with_getnetworkparams(base) == 0) { EVDNS_UNLOCK(base); return 0; } r = load_nameservers_from_registry(base); fname = evdns_get_default_hosts_filename(); evdns_base_load_hosts(base, fname);
