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.h | |
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.h')
-rw-r--r-- | src/common/tortls.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/common/tortls.h b/src/common/tortls.h index a93dcefaa4..52c8350fec 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -22,7 +22,7 @@ typedef struct tor_tls_t tor_tls_t; /* Possible return values for most tor_tls_* functions. */ #define _MIN_TOR_TLS_ERROR_VAL -9 #define TOR_TLS_ERROR_MISC -9 -/* Rename to unexpected close or something. XXXX */ +/* Rename to unexpected close or something. XXXX021 */ #define TOR_TLS_ERROR_IO -8 #define TOR_TLS_ERROR_CONNREFUSED -7 #define TOR_TLS_ERROR_CONNRESET -6 @@ -33,16 +33,20 @@ typedef struct tor_tls_t tor_tls_t; #define TOR_TLS_WANTWRITE -1 #define TOR_TLS_DONE 0 -/** Use this macro in a switch statement to catch _any_ TLS error. That way, - * if more errors are added, your switches will still work. */ -#define CASE_TOR_TLS_ERROR_ANY \ +/** DOCDOC XXXX021 also rename me. */ +#define CASE_TOR_TLS_ERROR_ANY_NONIO \ case TOR_TLS_ERROR_MISC: \ - case TOR_TLS_ERROR_IO: \ case TOR_TLS_ERROR_CONNREFUSED: \ case TOR_TLS_ERROR_CONNRESET: \ case TOR_TLS_ERROR_NO_ROUTE: \ case TOR_TLS_ERROR_TIMEOUT +/** Use this macro in a switch statement to catch _any_ TLS error. That way, + * if more errors are added, your switches will still work. */ +#define CASE_TOR_TLS_ERROR_ANY \ + CASE_TOR_TLS_ERROR_ANY_NONIO: \ + case TOR_TLS_ERROR_IO + #define TOR_TLS_IS_ERROR(rv) ((rv) < TOR_TLS_CLOSE) const char *tor_tls_err_to_string(int err); |