summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-30 10:47:48 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-30 10:47:48 +0000
commit3929f580189ebb7e515e03fa7dec76cccf1c859c (patch)
tree5f368e46a8841434d7b757d3ca93b84971b9175f
parent9f45de16b09bf8e1ae8e40dd5170d6e9940a302a (diff)
downloadtor-3929f580189ebb7e515e03fa7dec76cccf1c859c.tar.gz
tor-3929f580189ebb7e515e03fa7dec76cccf1c859c.zip
clean obsolete circuit_log_path code
svn:r3046
-rw-r--r--src/or/circuitbuild.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 65ffc3b364..b5c4b832f4 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -126,39 +126,9 @@ circuit_list_path(circuit_t *circ, int verbose)
* exit point.
*/
void circuit_log_path(int severity, circuit_t *circ) {
-#if 1
char *s = circuit_list_path(circ,1);
log_fn(severity,"%s",s);
tor_free(s);
-#else
- char buf[1024];
- char *s = buf;
- struct crypt_path_t *hop;
- const char *states[] = {"closed", "waiting for keys", "open"};
- routerinfo_t *router;
- tor_assert(CIRCUIT_IS_ORIGIN(circ));
- tor_assert(circ->cpath);
-
- tor_snprintf(s, sizeof(buf)-1, "circ (length %d, exit %s): ",
- circ->build_state->desired_path_len, circ->build_state->chosen_exit_name);
- hop=circ->cpath;
- do {
- s = buf + strlen(buf);
- router = router_get_by_digest(hop->identity_digest);
- if (router) {
- tor_snprintf(s, sizeof(buf) - (s - buf), "%s(%s) ",
- router->nickname, states[hop->state]);
- } else {
- if (circ->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
- tor_snprintf(s, sizeof(buf) - (s - buf), "(rendjoin hop)");
- } else {
- tor_snprintf(s, sizeof(buf) - (s - buf), "UNKNOWN ");
- }
- }
- hop=hop->next;
- } while (hop!=circ->cpath);
- log_fn(severity,"%s",buf);
-#endif
}
/** Tell the rep(utation)hist(ory) module about the status of the links