From 408a828b1f12462f7a31a5d84bcfa38399173b3e Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Fri, 19 Feb 2010 17:19:33 +0100 Subject: Make the DNSPort option work with libevent 2.x We need to use evdns_add_server_port_with_base() when configuring our DNS listener, because libevent segfaults otherwise. Add a macro in compat_libevent.h to pick the correct implementation depending on the libevent version. Fixes bug 1143, found by SwissTorExit --- src/or/dnsserv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or/dnsserv.c') diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 256dcbd75..8e3e55e79 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -299,8 +299,8 @@ dnsserv_configure_listener(connection_t *conn) tor_assert(conn->s >= 0); tor_assert(conn->type == CONN_TYPE_AP_DNS_LISTENER); - conn->dns_server_port = evdns_add_server_port(conn->s, 0, - evdns_server_callback, NULL); + conn->dns_server_port = + tor_evdns_add_server_port(conn->s, 0, evdns_server_callback, NULL); } /** Free the evdns server port for conn, which must be an -- cgit v1.2.3