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

[or-cvs] don"t mark_for_close again when the destroy arrives after t...



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

Modified Files:
	connection_edge.c 
Log Message:
don't mark_for_close again when the destroy arrives after the end cell


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- connection_edge.c	3 Mar 2004 06:26:34 -0000	1.110
+++ connection_edge.c	3 Mar 2004 07:24:53 -0000	1.111
@@ -92,6 +92,8 @@
 int connection_edge_destroy(uint16_t circ_id, connection_t *conn) {
   assert(conn->type == CONN_TYPE_AP || conn->type == CONN_TYPE_EXIT);
 
+  if(conn->marked_for_close)
+    return 0; /* already marked; probably got an 'end' */
   log_fn(LOG_INFO,"CircID %d: At an edge. Marking connection for close.",
          circ_id);
   conn->has_sent_end = 1; /* we're closing the circuit, nothing to send to */