[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r9060: correction and cleanups on r9047 (tor/trunk/src/or)



Author: arma
Date: 2006-12-09 14:40:16 -0500 (Sat, 09 Dec 2006)
New Revision: 9060

Modified:
   tor/trunk/src/or/circuitbuild.c
   tor/trunk/src/or/hibernate.c
   tor/trunk/src/or/or.h
   tor/trunk/src/or/rephist.c
Log:
correction and cleanups on r9047


Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2006-12-09 16:25:12 UTC (rev 9059)
+++ tor/trunk/src/or/circuitbuild.c	2006-12-09 19:40:16 UTC (rev 9060)
@@ -2377,7 +2377,7 @@
 
 /** Our list of entry guards has changed, or some element of one
  * of our entry guards has changed. Write the changes to disk within
- * the next 5 minutes.
+ * the next few minutes.
  */
 static void
 entry_guards_changed(void)

Modified: tor/trunk/src/or/hibernate.c
===================================================================
--- tor/trunk/src/or/hibernate.c	2006-12-09 16:25:12 UTC (rev 9059)
+++ tor/trunk/src/or/hibernate.c	2006-12-09 19:40:16 UTC (rev 9060)
@@ -577,7 +577,7 @@
     ROUND_UP(n_bytes_written_in_interval);
   state->AccountingSecondsActive = n_seconds_active_in_interval;
   state->AccountingExpectedUsage = expected_bandwidth_usage;
-  or_state_mark_dirty(state, 60);
+  or_state_mark_dirty(state, now+60);
 
   return r;
 }

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2006-12-09 16:25:12 UTC (rev 9059)
+++ tor/trunk/src/or/or.h	2006-12-09 19:40:16 UTC (rev 9060)
@@ -1663,7 +1663,7 @@
   /** When was the state last written to disk? */
   time_t LastWritten;
 
-  /** Fields for */
+  /** Fields for accounting bandwidth use. */
   time_t AccountingIntervalStart;
   uint64_t AccountingBytesReadInInterval;
   uint64_t AccountingBytesWrittenInInterval;
@@ -1686,15 +1686,14 @@
   int         BWHistoryWriteInterval;
   smartlist_t *BWHistoryWriteValues;
 
-  /** What version of Tor write this state file? */
+  /** What version of Tor wrote this state file? */
   char *TorVersion;
 
-  /** holds any unrecognized values we found in the state file, in the order
+  /** Holds any unrecognized values we found in the state file, in the order
    * in which we found them. */
   config_line_t *ExtraLines;
 } or_state_t;
 
-static void or_state_mark_dirty(or_state_t *state, time_t when);
 /** Change the next_write time of <b>state</b> to <b>when</b>, unless the
  * state is already scheduled to be written to disk earlier than <b>when</b>.
  */

Modified: tor/trunk/src/or/rephist.c
===================================================================
--- tor/trunk/src/or/rephist.c	2006-12-09 16:25:12 UTC (rev 9059)
+++ tor/trunk/src/or/rephist.c	2006-12-09 19:40:16 UTC (rev 9060)
@@ -667,6 +667,8 @@
     if (! server_mode(get_options())) {
       /* Clients don't need to store bandwidth history persistently;
        * force these values to the defaults. */
+      /* FFFF we should pull the default out of config.c's state table,
+       * so we don't have two defaults. */
       if (*s_begins != 0 || *s_interval != 900)
         or_state_mark_dirty(get_or_state(), time(NULL)+600);
       *s_begins = 0;