[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Backport check to make sure we dont use the cpath on a clos...



Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv7248/src/or

Modified Files:
      Tag: tor-0_0_9-patches
	relay.c 
Log Message:
Backport check to make sure we dont use the cpath on a closed connection

Index: relay.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/relay.c,v
retrieving revision 1.32.2.2
retrieving revision 1.32.2.3
diff -u -d -r1.32.2.2 -r1.32.2.3
--- relay.c	1 Mar 2005 22:43:41 -0000	1.32.2.2
+++ relay.c	23 Mar 2005 19:52:33 -0000	1.32.2.3
@@ -412,6 +412,12 @@
   relay_header_t rh;
   int cell_direction;
 
+  if (fromconn && fromconn->marked_for_close) {
+    log_fn(LOG_WARN,"Bug: called on conn that's already marked for close at %s:%d.",
+           fromconn->marked_for_close_file, fromconn->marked_for_close);
+    return 0;
+  }
+
   if (!circ) {
     log_fn(LOG_WARN,"no circ. Closing conn.");
     tor_assert(fromconn);