[or-cvs] bugfix: ^c ought to work even while hibernating

Roger Dingledine arma at seul.org
Tue Nov 9 11:14:36 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	hibernate.c 
Log Message:
bugfix: ^c ought to work even while hibernating


Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/src/or/hibernate.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- hibernate.c	9 Nov 2004 07:05:53 -0000	1.12
+++ hibernate.c	9 Nov 2004 11:14:34 -0000	1.13
@@ -195,6 +195,9 @@
 {
   uint64_t used;
   uint32_t max_configured = (get_options()->BandwidthRateBytes * 60);
+  /* XXX max_configured will be false if it exceeds
+   * get_options()->AccountingMaxKB*1000, right? -RD
+   */
 
   if (n_seconds_active_in_interval < 1800) {
     expected_bandwidth_usage = max_configured;
@@ -449,8 +452,6 @@
     exit(0);
   }
 
-  tor_assert(hibernate_state == HIBERNATE_STATE_LIVE);
-
   /* close listeners. leave control listener(s). */
   while((conn = connection_get_by_type(CONN_TYPE_OR_LISTENER)) ||
         (conn = connection_get_by_type(CONN_TYPE_AP_LISTENER)) ||
@@ -466,7 +467,6 @@
     log(LOG_NOTICE,"Interrupt: will shut down in %d seconds. Interrupt again to exit now.", SHUTDOWN_WAIT_LENGTH);
     hibernate_end_time = time(NULL) + SHUTDOWN_WAIT_LENGTH;
   } else { /* soft limit reached */
-    log_fn(LOG_NOTICE,"Bandwidth limit reached; beginning hibernation.");
     hibernate_end_time = interval_end_time;
   }
 



More information about the tor-commits mailing list