]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make PathsNeededToBuildCircuits option work.
authorKarsten Loesing <karsten.loesing@gmx.net>
Thu, 28 Mar 2013 08:42:49 +0000 (09:42 +0100)
committerNick Mathewson <nickm@torproject.org>
Thu, 28 Mar 2013 13:32:19 +0000 (09:32 -0400)
src/or/config.c
src/or/nodelist.c

index a238a1ae70e66a05c2a14aa3b439d4ce92886556..ffa984bcdad8bb793ff528603ccb1771006d0161 100644 (file)
@@ -2485,7 +2485,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
       log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing "
                "to 0.25");
       options->PathsNeededToBuildCircuits = 0.25;
-    } else if (options->PathsNeededToBuildCircuits < 0.95) {
+    } else if (options->PathsNeededToBuildCircuits > 0.95) {
       log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too high. Decreasing "
                "to 0.95");
       options->PathsNeededToBuildCircuits = 0.95;
index 5f3b843d022ed6c7bc2160c994b1e4ba8f26ecbf..178f084b696978866160c072bfc2acf90915b4b4 100644 (file)
@@ -1418,7 +1418,7 @@ get_frac_paths_needed_for_circs(const or_options_t *options,
                                 const networkstatus_t *ns)
 {
 #define DFLT_PCT_USABLE_NEEDED 60
-  if (options->PathsNeededToBuildCircuits >= 1.0) {
+  if (options->PathsNeededToBuildCircuits >= 0.0) {
     return options->PathsNeededToBuildCircuits;
   } else {
     return networkstatus_get_param(ns, "min_paths_for_circs_pct",