[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] clean obsolete circuit_log_path code



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c 
Log Message:
clean obsolete circuit_log_path code


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- circuitbuild.c	29 Nov 2004 22:25:29 -0000	1.65
+++ circuitbuild.c	30 Nov 2004 10:47:48 -0000	1.66
@@ -126,39 +126,9 @@
  * 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