[or-cvs] r13389: Remove a dead function. (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Feb 5 21:39:47 UTC 2008


Author: nickm
Date: 2008-02-05 16:39:46 -0500 (Tue, 05 Feb 2008)
New Revision: 13389

Modified:
   tor/trunk/
   tor/trunk/src/or/connection_or.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/relay.c
Log:
 r17915 at catbus:  nickm | 2008-02-05 16:28:57 -0500
 Remove a dead function.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r17915] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/connection_or.c
===================================================================
--- tor/trunk/src/or/connection_or.c	2008-02-05 21:39:44 UTC (rev 13388)
+++ tor/trunk/src/or/connection_or.c	2008-02-05 21:39:46 UTC (rev 13389)
@@ -587,12 +587,12 @@
   (void)tls;
 
   if (connection_tls_finish_handshake(conn) < 0) {
-    /* XXXX020 double-check that it's ok to do this from inside read. */
+    /* XXXX_TLS double-check that it's ok to do this from inside read. */
     connection_mark_for_close(TO_CONN(conn));
   }
 
 #if 0
-  /* XXXX020 this happens later, right? */
+  /* XXXX_TLS this happens later, right? */
   connection_or_init_conn_from_address(conn, conn->_base.addr,
                                        conn->_base.port, id_digest, 0);
 #endif
@@ -1010,14 +1010,9 @@
   cell.payload[0] = (uint8_t) reason;
   log_debug(LD_OR,"Sending destroy (circID %d).", circ_id);
 
-#if 0
-  /* XXXX020 Actually, don't kill the cell queue: it may have data that we're
-   * waiting to flush.  We need to do something more sensible here. */
-  /* Clear the cell queue on the circuit, so that our destroy cell will
-   * be the very next thing written.*/
-  circ = circuit_get_by_circid_orconn(circ_id, conn);
-  circuit_clear_cell_queue(circ, conn);
-#endif
+  /* XXXX It's possible that under some circumstances, we want the destroy
+   * to take precedence over other data waiting on the circuit's cell queue.
+   */
 
   connection_or_write_cell_to_buf(&cell, conn);
   return 0;

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2008-02-05 21:39:44 UTC (rev 13388)
+++ tor/trunk/src/or/or.h	2008-02-05 21:39:46 UTC (rev 13389)
@@ -3519,7 +3519,6 @@
 void assert_active_circuits_ok(or_connection_t *orconn);
 void make_circuit_inactive_on_conn(circuit_t *circ, or_connection_t *conn);
 void make_circuit_active_on_conn(circuit_t *circ, or_connection_t *conn);
-void circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn);
 
 /********************************* rephist.c ***************************/
 

Modified: tor/trunk/src/or/relay.c
===================================================================
--- tor/trunk/src/or/relay.c	2008-02-05 21:39:44 UTC (rev 13388)
+++ tor/trunk/src/or/relay.c	2008-02-05 21:39:46 UTC (rev 13389)
@@ -1516,7 +1516,8 @@
 static int total_cells_allocated = 0;
 
 #ifdef ENABLE_CELL_POOL /* Defined in ./configure. True by default. */
-/* XXX020 make cell pools the only option once we know they work? -RD */
+/* XXX020 make cell pools the only option once we know they work and improve
+ * matters? -RD */
 static mp_pool_t *cell_pool = NULL;
 /** Allocate structures to hold cells. */
 void
@@ -1921,27 +1922,6 @@
   }
 }
 
-/** Remove all the cells queued on <b>circ</b> for <b>orconn</b>. */
-void
-circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn)
-{
-  cell_queue_t *queue;
-  // int streams_blocked; // XXXX020 use this for something, or remove it.
-  if (circ->n_conn == orconn) {
-    queue = &circ->n_conn_cells;
-    // streams_blocked = circ->streams_blocked_on_n_conn;
-  } else {
-    or_circuit_t *orcirc = TO_OR_CIRCUIT(circ);
-    queue = &orcirc->p_conn_cells;
-    // streams_blocked = circ->streams_blocked_on_p_conn;
-  }
-
-  if (queue->n)
-    make_circuit_inactive_on_conn(circ,orconn);
-
-  cell_queue_clear(queue);
-}
-
 /** Fail with an assert if the active circuits ring on <b>orconn</b> is
  * corrupt.  */
 void



More information about the tor-commits mailing list