]> granicus.if.org Git - libevent/commitdiff
bug fix for issues #293 evdns_base_load_hosts doesn't remove outdated addresses
authorKuldeep Gupta <kuldeepjec@gmail.com>
Fri, 6 Dec 2013 11:36:20 +0000 (17:06 +0530)
committerKuldeep Gupta <kuldeepjec@gmail.com>
Fri, 6 Dec 2013 11:36:20 +0000 (17:06 +0530)
As mentioned at https://sourceforge.net/p/levent/bugs/293/
created a small function "evdns_base_flush_outdated_host_addresses" which removes all the previous host addresses, if user wants to clean up the list of hosts can call and use this function.
Defination of this function is part of another patch.

include/event2/dns.h

index edd2a23ec934be2fa58b9babc783a5678ebc8f50..b7ca09375679555c3efab076a88e2b075e100e38 100644 (file)
@@ -237,6 +237,12 @@ 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);
+
 /**
   Convert a DNS error code to a string.