[or-cvs] lower the number of seconds before we yell about clock jump.
arma at seul.org
arma at seul.org
Thu Jun 15 09:03:17 UTC 2006
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
circuitbuild.c main.c
Log Message:
lower the number of seconds before we yell about clock jump.
and make the yelling only happen if you're a server.
Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -p -d -r1.248 -r1.249
--- circuitbuild.c 14 Jun 2006 22:28:16 -0000 1.248
+++ circuitbuild.c 15 Jun 2006 09:03:15 -0000 1.249
@@ -660,9 +660,13 @@ circuit_send_next_onion_skin(circuit_t *
void
circuit_note_clock_jumped(int seconds_elapsed)
{
- log(LOG_WARN, LD_GENERAL,
- "Please report: your clock just jumped %d seconds forward; "
- "assuming established circuits no longer work.", seconds_elapsed);
+ if (server_mode(get_options()))
+ log(LOG_WARN, LD_GENERAL,
+ "Please report: your clock just jumped %d seconds forward; "
+ "assuming established circuits no longer work.", seconds_elapsed);
+ else
+ log(LOG_NOTICE, LD_GENERAL, "Your clock just jumped %d seconds forward; "
+ "assuming established circuits no longer work.", seconds_elapsed);
has_completed_circuit=0; /* so it'll log when it works again */
circuit_mark_all_unused_circs();
circuit_expire_all_dirty_circs();
Index: main.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.647
retrieving revision 1.648
diff -u -p -d -r1.647 -r1.648
--- main.c 7 Jun 2006 06:10:54 -0000 1.647
+++ main.c 15 Jun 2006 09:03:15 -0000 1.648
@@ -985,9 +985,11 @@ second_elapsed_callback(int fd, short ev
me->address, me->dir_port);
}
- /* if more than 100s have elapsed, probably the clock jumped: doesn't
- * count. */
- if (seconds_elapsed < 100)
+/** If more than this many seconds have elapsed, probably the clock
+ * jumped: doesn't count. */
+#define NUM_JUMPED_SECONDS_BEFORE_WARN 10
+/* This used to be 100, but I cranked it down for Mike Chiussi -RD */
+ if (seconds_elapsed < NUM_JUMPED_SECONDS_BEFORE_WARN)
stats_n_seconds_working += seconds_elapsed;
else
circuit_note_clock_jumped(seconds_elapsed);
More information about the tor-commits
mailing list