diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-01-16 15:30:20 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-16 15:30:20 -0500 |
commit | 9bd811b337f1316d26e5553f4d8720c9353d1b5d (patch) | |
tree | d28006f2e2fc5d6ee938b608f1baaa30ecc131bd /src/or/connection.c | |
parent | 65e6e68981d9910c5f78f2cfed6c59cbee1494c7 (diff) | |
download | tor-9bd811b337f1316d26e5553f4d8720c9353d1b5d.tar tor-9bd811b337f1316d26e5553f4d8720c9353d1b5d.tar.gz |
Refactor: Use SOCK_ERRNO to avoid some #ifdef _WIN32s
Fixes ticket 6302
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 74857b52c..b3719151f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1442,11 +1442,7 @@ connection_connect(connection_t *conn, const char *address, * Warn if we do, and refuse to make the connection. */ static ratelim_t disablenet_violated = RATELIM_INIT(30*60); char *m; -#ifdef _WIN32 - *socket_error = WSAENETUNREACH; -#else - *socket_error = ENETUNREACH; -#endif + *socket_error = SOCK_ERRNO(ENETUNREACH); if ((m = rate_limit_log(&disablenet_violated, approx_time()))) { log_warn(LD_BUG, "Tried to open a socket with DisableNetwork set.%s", m); tor_free(m); |