diff options
author | Andrea Shepard <andrea@torproject.org> | 2012-11-09 14:19:45 -0800 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2012-11-10 02:35:47 -0800 |
commit | 99e82cab30efdacd464deec524ee0da3576e69d9 (patch) | |
tree | 2ce98bc522a02cc7f1a83cf673fbb7f5685fd1d2 /src | |
parent | 8124398835097c3edfe0200a307092b71acfe0a0 (diff) | |
download | tor-99e82cab30efdacd464deec524ee0da3576e69d9.tar tor-99e82cab30efdacd464deec524ee0da3576e69d9.tar.gz |
Make everything in connection.c that uses connection_or_notify_error() also use connection_mark_and_close_internal() to avoid spurious warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/or/connection.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 5aac06ff1..e6755f410 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2763,7 +2763,11 @@ connection_handle_read_impl(connection_t *conn) } } connection_close_immediate(conn); /* Don't flush; connection is dead. */ - connection_mark_for_close(conn); + /* + * This can bypass normal channel checking since we did + * connection_or_notify_error() above. + */ + connection_mark_for_close_internal(conn); return -1; } n_read += buf_datalen(conn->inbuf) - before; @@ -3279,7 +3283,11 @@ connection_handle_write_impl(connection_t *conn, int force) tor_socket_strerror(e)); connection_close_immediate(conn); - connection_mark_for_close(conn); + /* + * This can bypass normal channel checking since we did + * connection_or_notify_error() above. + */ + connection_mark_for_close_internal(conn); return -1; } else { return 0; /* no change, see if next time is better */ @@ -3306,7 +3314,11 @@ connection_handle_write_impl(connection_t *conn, int force) "TLS error in connection_tls_" "continue_handshake()"); connection_close_immediate(conn); - connection_mark_for_close(conn); + /* + * This can bypass normal channel checking since we did + * connection_or_notify_error() above. + */ + connection_mark_for_close_internal(conn); return -1; } return 0; @@ -3336,7 +3348,11 @@ connection_handle_write_impl(connection_t *conn, int force) "TLS error in during flush" : "TLS closed during flush"); connection_close_immediate(conn); - connection_mark_for_close(conn); + /* + * This can bypass normal channel checking since we did + * connection_or_notify_error() above. + */ + connection_mark_for_close_internal(conn); return -1; case TOR_TLS_WANTWRITE: log_debug(LD_NET,"wanted write."); @@ -3401,7 +3417,11 @@ connection_handle_write_impl(connection_t *conn, int force) "connection_flushed_some()"); } - connection_mark_for_close(conn); + /* + * This can bypass normal channel checking since we did + * connection_or_notify_error() above. + */ + connection_mark_for_close_internal(conn); } } |