aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-03-23 00:28:39 -0400
committerNick Mathewson <nickm@torproject.org>2014-03-23 00:28:39 -0400
commitf560eeadc38f3146f17c55b0d00799b3ee7d5acf (patch)
treebf272bfd66824801e397441d263b99029658ed63 /src/or
parent2cfc4453c246bbd964cb9849bc5959bb1c510ae7 (diff)
downloadtor-f560eeadc38f3146f17c55b0d00799b3ee7d5acf.tar.gz
tor-f560eeadc38f3146f17c55b0d00799b3ee7d5acf.zip
Remove the unused circuit_dump_by_chan().
Also remove its helper function.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuitlist.c66
-rw-r--r--src/or/circuitlist.h1
2 files changed, 0 insertions, 67 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 867a9cd0a3..b1efde5ad5 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -930,72 +930,6 @@ circuit_dump_by_conn(connection_t *conn, int severity)
}
}
-/** A helper function for circuit_dump_by_chan() below. Log a bunch
- * of information about circuit <b>circ</b>.
- */
-static void
-circuit_dump_chan_details(int severity,
- circuit_t *circ,
- channel_t *chan,
- const char *type,
- circid_t this_circid,
- circid_t other_circid)
-{
- tor_log(severity, LD_CIRC, "Conn %p has %s circuit: circID %u "
- "(other side %u), state %d (%s), born %ld:",
- chan, type, (unsigned)this_circid, (unsigned)other_circid, circ->state,
- circuit_state_to_string(circ->state),
- (long)circ->timestamp_began.tv_sec);
- if (CIRCUIT_IS_ORIGIN(circ)) { /* circ starts at this node */
- circuit_log_path(severity, LD_CIRC, TO_ORIGIN_CIRCUIT(circ));
- }
-}
-
-/** Log, at severity <b>severity</b>, information about each circuit
- * that is connected to <b>chan</b>.
- */
-void
-circuit_dump_by_chan(channel_t *chan, int severity)
-{
- circuit_t *circ;
-
- tor_assert(chan);
-
- TOR_LIST_FOREACH(circ, &global_circuitlist, head) {
- circid_t n_circ_id = circ->n_circ_id, p_circ_id = 0;
-
- if (circ->marked_for_close) {
- continue;
- }
-
- if (!CIRCUIT_IS_ORIGIN(circ)) {
- p_circ_id = TO_OR_CIRCUIT(circ)->p_circ_id;
- }
-
- if (! CIRCUIT_IS_ORIGIN(circ) && TO_OR_CIRCUIT(circ)->p_chan &&
- TO_OR_CIRCUIT(circ)->p_chan == chan) {
- circuit_dump_chan_details(severity, circ, chan, "App-ward",
- p_circ_id, n_circ_id);
- }
-
- if (circ->n_chan && circ->n_chan == chan) {
- circuit_dump_chan_details(severity, circ, chan, "Exit-ward",
- n_circ_id, p_circ_id);
- }
-
- if (!circ->n_chan && circ->n_hop &&
- channel_matches_extend_info(chan, circ->n_hop) &&
- tor_memeq(chan->identity_digest,
- circ->n_hop->identity_digest, DIGEST_LEN)) {
- circuit_dump_chan_details(severity, circ, chan,
- (circ->state == CIRCUIT_STATE_OPEN &&
- !CIRCUIT_IS_ORIGIN(circ)) ?
- "Endpoint" : "Pending",
- n_circ_id, p_circ_id);
- }
- }
-}
-
/** Return the circuit whose global ID is <b>id</b>, or NULL if no
* such circuit exists. */
origin_circuit_t *
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h
index a29c29a49a..54a7ef42fa 100644
--- a/src/or/circuitlist.h
+++ b/src/or/circuitlist.h
@@ -22,7 +22,6 @@ const char *circuit_purpose_to_controller_string(uint8_t purpose);
const char *circuit_purpose_to_controller_hs_state_string(uint8_t purpose);
const char *circuit_purpose_to_string(uint8_t purpose);
void circuit_dump_by_conn(connection_t *conn, int severity);
-void circuit_dump_by_chan(channel_t *chan, int severity);
void circuit_set_p_circid_chan(or_circuit_t *circ, circid_t id,
channel_t *chan);
void circuit_set_n_circid_chan(circuit_t *circ, circid_t id,