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

[tor-commits] [tor/master] Make --version, --help, etc incremement quiet level, never decrease it



commit 6f9584b3fd5346bfc7ee58dedee2f1c292bf0354
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Oct 11 12:32:59 2013 -0400

    Make --version, --help, etc incremement quiet level, never decrease it
    
    Fixes other case of #9578
---
 changes/bug9578 |    6 ++++++
 src/or/main.c   |    6 ++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/changes/bug9578 b/changes/bug9578
new file mode 100644
index 0000000..96d66fe
--- /dev/null
+++ b/changes/bug9578
@@ -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.
+
diff --git a/src/or/main.c b/src/or/main.c
index ac756de..4d691bb 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -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);

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits