[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] print a statement when the first circ is finished,
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c main.c
Log Message:
print a statement when the first circ is finished,
so the user knows it's working
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- circuit.c 29 Feb 2004 00:11:37 -0000 1.143
+++ circuit.c 29 Feb 2004 03:52:38 -0000 1.144
@@ -1077,6 +1077,8 @@
return 0;
}
+extern int has_completed_circuit;
+
int circuit_finish_handshake(circuit_t *circ, char *reply) {
unsigned char iv[16];
unsigned char keys[40+32];
@@ -1128,6 +1130,10 @@
hop->state = CPATH_STATE_OPEN;
log_fn(LOG_INFO,"finished");
+ if(!has_completed_circuit) {
+ has_completed_circuit=1;
+ log_fn(LOG_WARN,"Tor has successfully opened a circuit. Looks like it's working.");
+ }
circuit_log_path(LOG_INFO,circ);
return 0;
}
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- main.c 29 Feb 2004 01:31:32 -0000 1.181
+++ main.c 29 Feb 2004 03:52:38 -0000 1.182
@@ -472,6 +472,7 @@
char keydir[512];
log_fn(LOG_WARN,"Received sighup. Reloading config.");
+ has_completed_circuit=0;
/* first, reload config variables, in case they've changed */
/* no need to provide argc/v, they've been cached inside init_from_config */
if (init_from_config(0, NULL) < 0) {