diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-10 04:24:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-10 04:24:02 +0000 |
commit | 1f4eafdb9175cf0d472656552875d8eba93d5fef (patch) | |
tree | b55e32a277cf7819fd3f19ee4dc0e8d22beb7f07 /src | |
parent | 069898a4b8afd41ded0e482a5d0474cc2f6ca121 (diff) | |
download | tor-1f4eafdb9175cf0d472656552875d8eba93d5fef.tar tor-1f4eafdb9175cf0d472656552875d8eba93d5fef.tar.gz |
r15619@catbus: nickm | 2007-10-10 00:23:45 -0400
Fix bug 483: downgrade a harmless "Hey your accept() implementation sucks" warning to an info.
svn:r11828
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index b6af0910f..b3d298435 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -899,7 +899,7 @@ connection_handle_listener_read(connection_t *conn, int new_type) struct sockaddr_in remote; char addrbuf[256]; /* length of the remote address. Must be whatever accept() needs. */ - socklen_t remotelen = 256; + socklen_t remotelen = sizeof(addrbuf); char tmpbuf[INET_NTOA_BUF_LEN]; or_options_t *options = get_options(); @@ -932,9 +932,11 @@ connection_handle_listener_read(connection_t *conn, int new_type) set_constrained_socket_buffers(news, (int)options->ConstrainedSockSize); if (((struct sockaddr*)addrbuf)->sa_family != conn->socket_family) { - log_warn(LD_BUG, "A listener connection returned a socket with a " + /* This is annoying, but can apparently happen on some Darwins. */ + log_info(LD_BUG, "A listener connection returned a socket with a " "mismatched family. %s for addr_family %d gave us a socket " - "with address family %d.", conn_type_to_string(conn->type), + "with address family %d. Dropping.", + conn_type_to_string(conn->type), (int)conn->socket_family, (int)((struct sockaddr*)addrbuf)->sa_family); tor_close_socket(news); |