mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Clean up some comments; remove some dead code
svn:r5493
This commit is contained in:
parent
61c5a9ae2b
commit
1b0134dda8
@ -411,8 +411,9 @@ circuit_n_conn_done(connection_t *or_conn, int status)
|
||||
continue;
|
||||
}
|
||||
debug(LD_CIRC,"Found circ %d, sending create cell.", circ->n_circ_id);
|
||||
/* circuit_deliver_create_cell will set n_circ_id and add us to the
|
||||
* index. */
|
||||
/* circuit_deliver_create_cell will set n_circ_id and add us to
|
||||
* orconn_circuid_circuit_map, so we don't need to call
|
||||
* set_circid_orconn here. */
|
||||
circ->n_conn = or_conn;
|
||||
memcpy(circ->n_conn_id_digest, or_conn->identity_digest, DIGEST_LEN);
|
||||
if (CIRCUIT_IS_ORIGIN(circ)) {
|
||||
|
@ -132,8 +132,8 @@ circuit_set_circid_orconn(circuit_t *circ, uint16_t id,
|
||||
++conn->n_circuits;
|
||||
}
|
||||
|
||||
/** Add <b>circ</b> to the list of circuits waiting for us to connect to
|
||||
* an OR. */
|
||||
/** Change the state of <b>circ</b> to <b>state</b>, adding it to or removing
|
||||
* it from lists as appropriate. */
|
||||
void
|
||||
circuit_set_state(circuit_t *circ, int state)
|
||||
{
|
||||
@ -142,9 +142,8 @@ circuit_set_state(circuit_t *circ, int state)
|
||||
return;
|
||||
if (circ->state == CIRCUIT_STATE_OR_WAIT) {
|
||||
/* remove from waiting-circuit list. */
|
||||
if (!circuits_pending_or_conns)
|
||||
circuits_pending_or_conns = smartlist_create();
|
||||
smartlist_remove(circuits_pending_or_conns, circ);
|
||||
if (circuits_pending_or_conns)
|
||||
smartlist_remove(circuits_pending_or_conns, circ);
|
||||
}
|
||||
if (state == CIRCUIT_STATE_OR_WAIT) {
|
||||
/* add to waiting-circuit list. */
|
||||
@ -155,13 +154,6 @@ circuit_set_state(circuit_t *circ, int state)
|
||||
circ->state = state;
|
||||
}
|
||||
|
||||
/** Remove <b>circ</b> from the list of circuits waiting for us to connect to
|
||||
* an OR. */
|
||||
void
|
||||
circuit_clear_state_orwait(circuit_t *circ)
|
||||
{
|
||||
}
|
||||
|
||||
/** Add <b>circ</b> to the global list of circuits. This is called only from
|
||||
* within circuit_new.
|
||||
*/
|
||||
|
@ -230,7 +230,8 @@ circuit_expire_building(time_t now)
|
||||
case CIRCUIT_PURPOSE_REND_ESTABLISHED:
|
||||
/* OR-side. We can't actually reach this point because of the
|
||||
* IS_ORIGIN test above. */
|
||||
continue;
|
||||
continue; /* yes, continue inside a switch refers to the nearest
|
||||
* enclosing loop. C is smart. */
|
||||
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
|
||||
case CIRCUIT_PURPOSE_C_INTRODUCING:
|
||||
case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO:
|
||||
|
@ -424,7 +424,7 @@ connection_ap_detach_retriable(connection_t *conn, circuit_t *circ)
|
||||
}
|
||||
|
||||
/** A client-side struct to remember requests to rewrite addresses
|
||||
* to new addresses. These structs are stored the hash table
|
||||
* to new addresses. These structs are stored in the hash table
|
||||
* "addressmap" below.
|
||||
*
|
||||
* There are 5 ways to set an address mapping:
|
||||
|
Loading…
Reference in New Issue
Block a user