Commit cf6fe276 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

r17915@catbus: nickm | 2008-02-05 16:28:57 -0500

 Remove a dead function.


svn:r13389
parent 92aaf68d
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -587,12 +587,12 @@ connection_or_tls_renegotiated_cb(tor_tls_t *tls, void *_conn)
  (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 @@ connection_or_send_destroy(uint16_t circ_id, or_connection_t *conn, int reason)
  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;
+0 −1
Original line number Diff line number Diff line
@@ -3519,7 +3519,6 @@ int connection_or_flush_from_first_active_circuit(or_connection_t *conn,
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 ***************************/

+2 −22
Original line number Diff line number Diff line
@@ -1516,7 +1516,8 @@ circuit_consider_sending_sendme(circuit_t *circ, crypt_path_t *layer_hint)
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 @@ append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn,
  }
}

/** 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