]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make --version, --help, etc incremement quiet level, never decrease it
authorNick Mathewson <nickm@torproject.org>
Fri, 11 Oct 2013 16:32:59 +0000 (12:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 11 Oct 2013 16:32:59 +0000 (12:32 -0400)
Fixes other case of #9578

changes/bug9578 [new file with mode: 0644]
src/or/main.c

diff --git a/changes/bug9578 b/changes/bug9578
new file mode 100644 (file)
index 0000000..96d66fe
--- /dev/null
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - When a command-line option such as --version or --help that ordinarily
+      implies --hush appears on the command line along with --quiet, obey
+      --quiet. Previously, we obeyed --quiet only if it appeared later on the
+      command line. Fixes bug 9578; bugfix on 0.2.5.1-alpha.
+
index ac756de5d22d91f57a24671db122a552f5d8faf1..4d691bb1895ce9ff20ba8a69aeb62d1cb1dd3ffe 100644 (file)
@@ -2355,8 +2355,10 @@ tor_init(int argc, char *argv[])
       if (!strcmp(cl->key, "--version") || !strcmp(cl->key, "--digests") ||
           !strcmp(cl->key, "--list-torrc-options") ||
           !strcmp(cl->key, "--library-versions") ||
-          !strcmp(cl->key, "-h") || !strcmp(cl->key, "--help"))
-        quiet = 1;
+          !strcmp(cl->key, "-h") || !strcmp(cl->key, "--help")) {
+        if (quiet < 1)
+          quiet = 1;
+      }
     }
     config_free_lines(opts);
     config_free_lines(cmdline_opts);