[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Backport part of "JAP-Client" fix. (Specifically, backporr...
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] Backport part of "JAP-Client" fix. (Specifically, backporr...
- From: nickm@xxxxxxxx (Nick Mathewson)
- Date: Sat, 23 Apr 2005 10:32:27 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 23 Apr 2005 10:32:59 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home/or/cvsroot/tor/src/common
In directory moria.mit.edu:/tmp/cvs-serv25494/src/common
Modified Files:
Tag: tor-0_0_9-patches
tortls.c tortls.h
Log Message:
Backport part of "JAP-Client" fix. (Specifically, backporrt the part that refrains from crashing on uncaught TLS errors.)
Index: tortls.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/tortls.c,v
retrieving revision 1.82
retrieving revision 1.82.2.1
diff -u -d -r1.82 -r1.82.2.1
--- tortls.c 7 Dec 2004 07:47:57 -0000 1.82
+++ tortls.c 23 Apr 2005 14:32:25 -0000 1.82.2.1
@@ -803,14 +803,12 @@
/** Implement assert_no_tls_errors: If there are any pending OpenSSL
* errors, log an error message and assert(0). */
-void _assert_no_tls_errors(const char *fname, int line)
+void _check_no_tls_errors(const char *fname, int line)
{
if (ERR_peek_error() == 0)
return;
log_fn(LOG_ERR, "Unhandled OpenSSL errors found at %s:%d: ",
fname, line);
tls_log_errors(LOG_ERR, NULL);
-
- tor_assert(0);
}
Index: tortls.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/tortls.h,v
retrieving revision 1.22.2.1
retrieving revision 1.22.2.2
diff -u -d -r1.22.2.1 -r1.22.2.2
--- tortls.h 22 Dec 2004 02:57:32 -0000 1.22.2.1
+++ tortls.h 23 Apr 2005 14:32:25 -0000 1.22.2.2
@@ -43,9 +43,9 @@
/* Log and abort if there are unhandled TLS errors in OpenSSL's error stack.
*/
-#define assert_no_tls_errors() _assert_no_tls_errors(_SHORT_FILE_,__LINE__)
+#define check_no_tls_errors() _check_no_tls_errors(_SHORT_FILE_,__LINE__)
-void _assert_no_tls_errors(const char *fname, int line);
+void _check_no_tls_errors(const char *fname, int line);
#endif