diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-12-06 10:50:17 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-12-06 10:50:17 -0500 |
commit | 45eba6ffd5cf28e20d906a6bb0e2c8a2e242ba56 (patch) | |
tree | 5f29efd98c214125a0be044d177484ed54b7cb2e /include | |
parent | aeb8d345b47bee0522f1ce32a20bfc8a642d657c (diff) | |
download | libevent-45eba6ffd5cf28e20d906a6bb0e2c8a2e242ba56.tar.gz |
Rename flush_outdated_host_addresses to clear_host_addresses
"flush" can imply writing something out to a file or connection before
clearing it; "clear" always means "remove". It's also potentially
misleading to say "outdated" here, since the function removes _all_
addresses regardless, not just certain outdated ones.
Also, don't free the lock in this function. Also reindent the function.
Diffstat (limited to 'include')
-rw-r--r-- | include/event2/dns.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/event2/dns.h b/include/event2/dns.h index b7ca0937..fd4dec68 100644 --- a/include/event2/dns.h +++ b/include/event2/dns.h @@ -237,11 +237,13 @@ struct evdns_base * evdns_base_new(struct event_base *event_base, int initialize */ void evdns_base_free(struct evdns_base *base, int fail_requests); -/** - All previous outdated host addresses will be removed or flushed from the event base. - @param evdns_base the evdns base to flush outdated host addresses -*/ -void evdns_base_flush_outdated_host_addresses(struct evdns_base *base); +/** + Remove all hosts entries that have been loaded into the event_base via + evdns_base_load_hosts or via event_base_resolv_conf_parse. + + @param evdns_base the evdns base to remove outdated host addresses from + */ +void evdns_base_clear_host_addresses(struct evdns_base *base); /** Convert a DNS error code to a string. @@ -449,6 +451,9 @@ int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char Note that only evdns_getaddrinfo uses the /etc/hosts entries. + This function does not replace previously loaded hosts entries; to do that, + call evdns_base_clear_host_addresses first. + Return 0 on success, negative on failure. */ int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname); |