aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-17 10:25:38 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-17 10:25:38 +0000
commit65d507b98064f301bbfd41da1196a94bcfd5e0d7 (patch)
treee7a0a8856ff61c4a1acbf89ac534c9b6061d2af8 /src
parent26dd5c68b09554dd4e2c50b18b858db7acd274cc (diff)
downloadtor-65d507b98064f301bbfd41da1196a94bcfd5e0d7.tar
tor-65d507b98064f301bbfd41da1196a94bcfd5e0d7.tar.gz
log n_circ_ids when attaching rend streams
svn:r1657
Diffstat (limited to 'src')
-rw-r--r--src/or/circuit.c8
-rw-r--r--src/or/connection_edge.c21
2 files changed, 18 insertions, 11 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 1e3036906..16fc8bb6e 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -474,13 +474,15 @@ void circuit_expire_building(time_t now) {
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));
}
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 28ce5a2cc..0bfca3987 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -876,7 +876,7 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
/* 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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
}
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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
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 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
}
}
- 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;
}
}