[or-cvs] r9883: put the stopgap on whether we've sent a create cell, not whe (tor/trunk/src/or)

arma at seul.org arma at seul.org
Tue Mar 20 03:26:52 UTC 2007


Author: arma
Date: 2007-03-19 23:26:51 -0400 (Mon, 19 Mar 2007)
New Revision: 9883

Modified:
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/connection_edge.c
Log:
put the stopgap on whether we've sent a create cell, not
whether we've attached a stream.


Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2007-03-20 03:21:51 UTC (rev 9882)
+++ tor/trunk/src/or/circuitbuild.c	2007-03-20 03:26:51 UTC (rev 9883)
@@ -489,6 +489,10 @@
 
   memcpy(cell.payload, payload, ONIONSKIN_CHALLENGE_LEN);
   connection_or_write_cell_to_buf(&cell, circ->n_conn);
+
+  /* mark it so it gets better rate limiting treatment. */
+  circ->n_conn->client_used = 1;
+
   return 0;
 }
 

Modified: tor/trunk/src/or/connection_edge.c
===================================================================
--- tor/trunk/src/or/connection_edge.c	2007-03-20 03:21:51 UTC (rev 9882)
+++ tor/trunk/src/or/connection_edge.c	2007-03-20 03:26:51 UTC (rev 9883)
@@ -1792,11 +1792,6 @@
   log_info(LD_APP,"Address/port sent, ap socket %d, n_circ_id %d",
            ap_conn->_base.s, circ->_base.n_circ_id);
   control_event_stream_status(ap_conn, STREAM_EVENT_SENT_CONNECT, 0);
-
-  if ((TO_CIRCUIT(circ))->n_conn) {
-    /* mark it so it gets better rate limiting treatment. */
-    (TO_CIRCUIT(circ))->n_conn->client_used = 1;
-  }
   return 0;
 }
 



More information about the tor-commits mailing list