Browse Source

Stop discarding command-line arguments when TestingTorNetwork is set

Discovered by Kevin Bauer. Fixes bug 5373; bugfix on 0.2.3.9-alpha,
where task 4552 added support for two layers of torrc files.
Roger Dingledine 12 years ago
parent
commit
12594f27db
2 changed files with 12 additions and 0 deletions
  1. 5 0
      changes/bug5373
  2. 7 0
      src/or/config.c

+ 5 - 0
changes/bug5373

@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - Stop discarding command-line arguments when TestingTorNetwork
+      is set. Discovered by Kevin Bauer. Fixes bug 5373; bugfix on
+      0.2.3.9-alpha, where task 4552 added support for two layers of
+      torrc files.

+ 7 - 0
src/or/config.c

@@ -4660,6 +4660,13 @@ options_init_from_string(const char *cf_defaults, const char *cf,
       if (i==0)
         newdefaultoptions = options_dup(&options_format, newoptions);
     }
+    /* Assign command-line variables a second time too */
+    retval = config_assign(&options_format, newoptions,
+                           global_cmdline_options, 0, 0, msg);
+    if (retval < 0) {
+      err = SETOPT_ERR_PARSE;
+      goto err;
+    }
   }
 
   /* Validate newoptions */