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

[or-cvs] r11083: Make voting interval configurable. (in tor/trunk: . src/or)



Author: nickm
Date: 2007-08-13 14:09:38 -0400 (Mon, 13 Aug 2007)
New Revision: 11083

Modified:
   tor/trunk/
   tor/trunk/src/or/config.c
   tor/trunk/src/or/dirvote.c
   tor/trunk/src/or/or.h
Log:
 r14526@catbus:  nickm | 2007-08-13 14:08:37 -0400
 Make voting interval configurable.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14526] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-08-13 13:36:32 UTC (rev 11082)
+++ tor/trunk/src/or/config.c	2007-08-13 18:09:38 UTC (rev 11083)
@@ -271,6 +271,8 @@
   VAR("V1AuthoritativeDirectory",BOOL, V1AuthoritativeDir,   "0"),
   VAR("V2AuthoritativeDirectory",BOOL, V2AuthoritativeDir,   "0"),
   VAR("V3AuthoritativeDirectory",BOOL, V3AuthoritativeDir,   "0"),
+  /* XXXX020 check this for sanity. */
+  VAR("V3AuthVotingInterval",INTERVAL, V3AuthVotingInterval, "1 hour"),
   VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
   VAR("VirtualAddrNetwork",  STRING,   VirtualAddrNetwork,   "127.192.0.0/10"),
   VAR("__AllDirActionsPrivate",BOOL,   AllDirActionsPrivate, "0"),

Modified: tor/trunk/src/or/dirvote.c
===================================================================
--- tor/trunk/src/or/dirvote.c	2007-08-13 13:36:32 UTC (rev 11082)
+++ tor/trunk/src/or/dirvote.c	2007-08-13 18:09:38 UTC (rev 11083)
@@ -998,10 +998,12 @@
 void
 dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out)
 {
+  or_options_t *options = get_options();
+
   tor_assert(timing_out);
 
-  /* XXXX020 make these configurable. */
-  timing_out->vote_interval = 3600;
+  timing_out->vote_interval = options->V3AuthVotingInterval;
+ /* XXXX020 make these configurable. */
   timing_out->n_intervals_valid = 3;
   timing_out->vote_delay = 300;
   timing_out->dist_delay = 300;

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2007-08-13 13:36:32 UTC (rev 11082)
+++ tor/trunk/src/or/or.h	2007-08-13 18:09:38 UTC (rev 11083)
@@ -2060,13 +2060,16 @@
                                * support BEGIN_DIR, when possible. */
   int AllowNonRFC953Hostnames; /**< If true, we allow connections to hostnames
                                 * with weird characters. */
- /** If true, we try resolving hostnames with weird characters. */
+  /** If true, we try resolving hostnames with weird characters. */
   int ServerDNSAllowNonRFC953Hostnames;
 
   /** If true, we try to download extra-info documents (and we serve them,
    * if we are a cache).  For authorities, this is always true. */
   int DownloadExtraInfo;
 
+  /** DOCDOC */
+  int V3AuthVotingInterval;
+
 } or_options_t;
 
 /** Persistent state for an onion router, as saved to disk. */