[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[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);