aboutsummaryrefslogtreecommitdiff
path: root/src/or/dnsserv.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-02-19 17:19:33 +0100
committerSebastian Hahn <sebastian@torproject.org>2010-02-19 22:36:53 +0100
commit408a828b1f12462f7a31a5d84bcfa38399173b3e (patch)
tree21dac2d6ce48e7e36c0bd3034c34806e4f2122bc /src/or/dnsserv.c
parent0bd6cb31edbd33764c8d24dc3e79b8a7ca9eba84 (diff)
downloadtor-408a828b1f12462f7a31a5d84bcfa38399173b3e.tar
tor-408a828b1f12462f7a31a5d84bcfa38399173b3e.tar.gz
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
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r--src/or/dnsserv.c4
1 files changed, 2 insertions, 2 deletions
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 <b>conn</b>, which must be an