mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
remove dead code
circuits no longer queue more cells when the windows are empty -- they simply don't package it from the buffer if they're not going to want it. we can restore this code later if we need to resume queueing. svn:r294
This commit is contained in:
@@ -172,38 +172,6 @@ void command_process_relay_cell(cell_t *cell, connection_t *conn) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(cell->aci == circ->p_aci) { /* it's an outgoing cell */
|
||||
if(--circ->p_receive_circwindow < 0) { /* is it less than 0 after decrement? */
|
||||
log(LOG_INFO,"command_process_relay_cell(): Too many relay cells for out circuit (aci %d). Closing.", circ->p_aci);
|
||||
circuit_close(circ);
|
||||
return;
|
||||
}
|
||||
log(LOG_DEBUG,"command_process_relay_cell(): p_receive_circwindow for aci %d is %d.",circ->p_aci,circ->p_receive_circwindow);
|
||||
}
|
||||
|
||||
if(cell->aci == circ->n_aci) { /* it's an ingoing cell */
|
||||
if(--circ->n_receive_circwindow < 0) { /* is it less than 0 after decrement? */
|
||||
log(LOG_INFO,"command_process_relay_cell(): Too many relay cells for in circuit (aci %d). Closing.", circ->n_aci);
|
||||
circuit_close(circ);
|
||||
return;
|
||||
}
|
||||
log(LOG_DEBUG,"command_process_relay_cell(): n_receive_circwindow for aci %d is %d.",circ->n_aci,circ->n_receive_circwindow);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if(circ->state == CIRCUIT_STATE_ONION_WAIT) {
|
||||
log(LOG_WARNING,"command_process_relay_cell(): circuit in onion_wait. Dropping relay cell.");
|
||||
return;
|
||||
}
|
||||
if(circ->state == CIRCUIT_STATE_OR_WAIT) {
|
||||
log(LOG_WARNING,"command_process_relay_cell(): circuit in or_wait. Dropping relay cell.");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/* circ->p_conn and n_conn are only null if we're at an edge point with no connections yet */
|
||||
|
||||
if(cell->aci == circ->p_aci) { /* it's an outgoing cell */
|
||||
cell->aci = circ->n_aci; /* switch it */
|
||||
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_OUT, conn->cpath_layer) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user