diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-23 00:17:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-05-23 00:17:48 -0400 |
commit | cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd (patch) | |
tree | f720f8ec3f8dcc065ea47b2c10c1e2885403e082 /src/or/dnsserv.c | |
parent | 1ba1bdee4bd8f3c00e603fe9b0fd2f14eeb60466 (diff) | |
download | tor-cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd.tar.gz tor-cfeafe5e77c9dd5587b1ec553eb1065f0bf841fd.zip |
Use a 64-bit type to hold sockets on win64.
On win64, sockets are of type UINT_PTR; on win32 they're u_int;
elsewhere they're int. The correct windows way to check a socket for
being set is to compare it with INVALID_SOCKET; elsewhere you see if
it is negative.
On Libevent 2, all callbacks take sockets as evutil_socket_t; we've
been passing them int.
This patch should fix compilation and correctness when built for
64-bit windows. Fixes bug 3270.
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r-- | src/or/dnsserv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 243b730cbf..009ab5f344 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -306,7 +306,7 @@ void dnsserv_configure_listener(connection_t *conn) { tor_assert(conn); - tor_assert(conn->s >= 0); + tor_assert(SOCKET_OK(conn->s)); tor_assert(conn->type == CONN_TYPE_AP_DNS_LISTENER); conn->dns_server_port = |