diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-21 16:11:58 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-21 16:11:58 +0000 |
commit | e2f25558b9ec2ed70a92026870a46b5b68799ebf (patch) | |
tree | 3d45bcced8c42a9fcaa8c1022fc77bfa3b7c0a6c /src/common/tortls.c | |
parent | e18ee2a2abc9ee5dca56e1744babfb7d5733d32d (diff) | |
download | tor-e2f25558b9ec2ed70a92026870a46b5b68799ebf.tar.gz tor-e2f25558b9ec2ed70a92026870a46b5b68799ebf.zip |
r14362@31-33-219: nickm | 2008-02-21 11:01:10 -0500
Change some of our log messages related to closed TLS connections in order to better reflect reality.
svn:r13657
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index fb9b26a82a..2918ab288e 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -282,12 +282,9 @@ tor_tls_get_error(tor_tls_t *tls, int r, int extra, case SSL_ERROR_ZERO_RETURN: if (extra&CATCH_ZERO) return _TOR_TLS_ZERORETURN; - log(severity, LD_NET, "TLS error: Zero return"); + log(severity, LD_NET, "TLS connection closed while %s", doing); tls_log_errors(tls, severity, doing); - /* XXXX020rc Actually, a 'zero return' error has a pretty specific - * meaning: the connection has been closed cleanly. -NM - * Great. Do something smart here then. :) -RD */ - return TOR_TLS_ERROR_MISC; + return TOR_TLS_CLOSE; default: tls_log_errors(tls, severity, doing); return TOR_TLS_ERROR_MISC; @@ -858,7 +855,7 @@ tor_tls_read(tor_tls_t *tls, char *cp, size_t len) return r; } err = tor_tls_get_error(tls, r, CATCH_ZERO, "reading", LOG_DEBUG); - if (err == _TOR_TLS_ZERORETURN) { + if (err == _TOR_TLS_ZERORETURN || err == TOR_TLS_CLOSE) { log_debug(LD_NET,"read returned r=%d; TLS is closed",r); tls->state = TOR_TLS_ST_CLOSED; return TOR_TLS_CLOSE; |