[or-cvs] log n_circ_ids when attaching rend streams
Roger Dingledine
arma at seul.org
Sat Apr 17 10:25:40 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c connection_edge.c
Log Message:
log n_circ_ids when attaching rend streams
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -d -r1.214 -r1.215
--- circuit.c 17 Apr 2004 10:04:00 -0000 1.214
+++ circuit.c 17 Apr 2004 10:25:38 -0000 1.215
@@ -474,13 +474,15 @@
if(victim->purpose >= CIRCUIT_PURPOSE_C_INTRODUCING &&
victim->purpose <= CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
if(!victim->timestamp_dirty)
- log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (clean).",
+ log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (circid %d). (clean).",
victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
- victim->purpose, victim->build_state->chosen_exit);
+ victim->purpose, victim->build_state->chosen_exit,
+ victim->n_circ_id);
else
- log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s. %d secs since dirty.",
+ log_fn(LOG_DEBUG,"Considering %sopen purp %d to %s (circid %d). %d secs since dirty.",
victim->state == CIRCUIT_STATE_OPEN ? "" : "non",
victim->purpose, victim->build_state->chosen_exit,
+ victim->n_circ_id,
(int)(now - victim->timestamp_dirty));
}
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -d -r1.171 -r1.172
--- connection_edge.c 17 Apr 2004 05:17:40 -0000 1.171
+++ connection_edge.c 17 Apr 2004 10:25:38 -0000 1.172
@@ -876,7 +876,7 @@
conn_age = time(NULL) - conn->timestamp_created;
if(conn_age > 60) {
/* XXX make this cleaner than '60' */
- log_fn(LOG_WARN,"Giving up on attached circ (%d sec old).", conn_age);
+ log_fn(LOG_WARN,"Giving up on unattached conn (%d sec old).", conn_age);
connection_mark_for_close(conn, 0);
}
@@ -890,7 +890,8 @@
/* We have found a suitable circuit for our conn. Hurray. */
- log_fn(LOG_DEBUG,"Attaching apconn to general circ (%d sec old).", conn_age);
+ log_fn(LOG_DEBUG,"Attaching apconn to general circ %d (stream %d sec old).",
+ circ->n_circ_id, conn_age);
/* here, print the circ's path. so people can figure out which circs are sucking. */
circuit_log_path(LOG_INFO,circ);
@@ -915,7 +916,8 @@
if(retval > 0) {
/* one is already established, attach */
- log_fn(LOG_INFO,"rend joined circ already here. attaching. (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"rend joined circ %d already here. attaching. (stream %d sec old)",
+ rendcirc->n_circ_id, conn_age);
link_apconn_to_circ(conn, rendcirc);
if(connection_ap_handshake_send_begin(conn, rendcirc) < 0)
return 0; /* already marked, let them fade away */
@@ -923,7 +925,7 @@
}
if(rendcirc->purpose == CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
- log_fn(LOG_INFO,"pending-join circ already here, with intro ack. Stalling. (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"pending-join circ %d already here, with intro ack. Stalling. (stream %d sec old)", rendcirc->n_circ_id, conn_age);
return 0;
}
@@ -934,19 +936,22 @@
if(retval > 0) {
/* one has already sent the intro. keep waiting. */
- log_fn(LOG_INFO,"Intro circ present and awaiting ack. Stalling. (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"Intro circ %d present and awaiting ack (rend %d). Stalling. (stream %d sec old)",
+ introcirc->n_circ_id, rendcirc->n_circ_id, conn_age);
return 0;
}
/* now both rendcirc and introcirc are defined, and neither is finished */
if(rendcirc->purpose == CIRCUIT_PURPOSE_C_REND_READY) {
- log_fn(LOG_INFO,"ready rend circ already here (no intro-ack yet). (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"ready rend circ %d already here (no intro-ack yet on intro %d). (stream %d sec old)",
+ rendcirc->n_circ_id, introcirc->n_circ_id, conn_age);
/* look around for any new intro circs that should introduce */
assert(introcirc->purpose == CIRCUIT_PURPOSE_C_INTRODUCING);
if(introcirc->state == CIRCUIT_STATE_OPEN) {
- log_fn(LOG_INFO,"found open intro circ; sending introduction. (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"found open intro circ %d (rend %d); sending introduction. (stream %d sec old)",
+ introcirc->n_circ_id, rendcirc->n_circ_id, conn_age);
/* XXX here we should cannibalize the rend circ if it's a zero service id */
if(rend_client_send_introduction(introcirc, rendcirc) < 0) {
return -1;
@@ -959,7 +964,7 @@
}
}
- log_fn(LOG_INFO,"Intro and rend circs are not both ready. Stalling conn. (%d sec old)", conn_age);
+ log_fn(LOG_INFO,"Intro (%d) and rend (%d) circs are not both ready. Stalling conn. (%d sec old)", introcirc->n_circ_id, rendcirc->n_circ_id, conn_age);
return 0;
}
}
More information about the tor-commits
mailing list