[or-cvs] when a stream is 15s late, print out the circuit at -l warn
Roger Dingledine
arma at seul.org
Sun Feb 29 09:15:31 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
connection_edge.c
Log Message:
when a stream is 15s late, print out the circuit at -l warn
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- connection_edge.c 29 Feb 2004 00:11:37 -0000 1.102
+++ connection_edge.c 29 Feb 2004 09:15:29 -0000 1.103
@@ -529,6 +529,7 @@
void connection_ap_expire_beginning(void) {
connection_t **carray;
connection_t *conn;
+ circuit_t *circ;
int n, i;
time_t now = time(NULL);
@@ -542,6 +543,8 @@
if (now - conn->timestamp_lastread >= 15) {
log_fn(LOG_WARN,"Stream is %d seconds late. Retrying.",
(int)(now - conn->timestamp_lastread));
+ circ = circuit_get_by_conn(conn);
+ circuit_log_path(LOG_WARN, circ);
/* send an end down the circuit */
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
/* un-mark it as ending, since we're going to reuse it */
@@ -550,7 +553,7 @@
* reattach to this same circuit, but that's good enough for now.
*/
conn->state = AP_CONN_STATE_CIRCUIT_WAIT;
- circuit_detach_stream(circuit_get_by_conn(conn), conn);
+ circuit_detach_stream(circ, conn);
/* give it another 15 seconds to try */
conn->timestamp_lastread += 15;
if(connection_ap_handshake_attach_circuit(conn)<0) {
More information about the tor-commits
mailing list