[or-cvs] Backport the fix for trying to print a null pointer.

Roger Dingledine arma at seul.org
Wed Apr 27 04:30:56 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or

Modified Files:
      Tag: tor-0_0_9-patches
	circuitbuild.c 
Log Message:
Backport the fix for trying to print a null pointer.
This isn't urgent, since it only appears when you're running
at loglevel debug, and if you're doing that, and you use a sparc,
I guess you deserve to crash.


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.75.2.2
retrieving revision 1.75.2.3
diff -u -d -r1.75.2.2 -r1.75.2.3
--- circuitbuild.c	27 Mar 2005 07:17:39 -0000	1.75.2.2
+++ circuitbuild.c	27 Apr 2005 04:30:53 -0000	1.75.2.3
@@ -309,7 +309,8 @@
 void circuit_n_conn_done(connection_t *or_conn, int status) {
   circuit_t *circ;
 
-  log_fn(LOG_DEBUG,"or_conn to %s, status=%d", or_conn->nickname, status);
+  log_fn(LOG_DEBUG,"or_conn to %s, status=%d",
+         or_conn->nickname ? or_conn->nickname : "NULL", status);
 
   for (circ=global_circuitlist;circ;circ = circ->next) {
     if (circ->marked_for_close)



More information about the tor-commits mailing list