]> Pileus Git - ~andy/fetchmail/commitdiff
Some verbose output disappeared in debug mode. Adding further -v options
authorMatthias Andree <matthias.andree@gmx.de>
Wed, 4 Jan 2006 16:03:20 +0000 (16:03 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Wed, 4 Jan 2006 16:03:20 +0000 (16:03 -0000)
would alternate between verbose and debug mode. debug mode now comprises
all verbose output, and adding more -v options does not switch back from
debug to verbose mode.

svn path=/branches/BRANCH_6-3/; revision=4597

NEWS
fetchmail.c
options.c
socket.c

diff --git a/NEWS b/NEWS
index 9ded5a5422ac7d8456c6580e746f0f82b9c778e9..828ca9b05f540db980dbdfab0dbce26ec208d89b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,10 @@ fetchmail 6.3.2 (to be released):
   6.3.0.  Matthias Andree.
 * fetchmailconf.py: Fix novice help for Poll interval and fetchall.
   Reported by Justin Pryzby, Debian Bug #344978.  Matthias Andree
+* Some verbose output disappeared in debug mode. Adding further -v options would
+  alternate between verbose and debug mode. debug mode now comprises all verbose
+  output, and adding more -v options does not switch back from debug to verbose
+  mode.  Matthias Andree
 
 fetchmail 6.3.1 (released 2005-12-19):
 
index d0b55114a2de98844a33c1276946078b3b592c1d..3c331e5aafba6ed1a79ebdc1c1f16fec076125dd 100644 (file)
@@ -992,7 +992,7 @@ static int load_params(int argc, char **argv, int optind)
                        || str_in_list(&ctl->server.akalist, argv[optind], TRUE))
                {
                    /* Is this correct? */
-                   if (predeclared && outlevel == O_VERBOSE)
+                   if (predeclared && outlevel >= O_VERBOSE)
                        fprintf(stderr,GT_("Warning: multiple mentions of host %s in config file\n"),argv[optind]);
                    ctl->active = TRUE;
                    predeclared = TRUE;
index bd607237860e82c05d86890057cdd964f29fafb2..5e9599cebd1e43fc88cceb58deb5ad754681f757 100644 (file)
--- a/options.c
+++ b/options.c
@@ -254,7 +254,7 @@ struct query *ctl;  /* option record to be initialized */
            outlevel = O_SILENT;
            break;
        case 'v':
-           if (outlevel == O_VERBOSE)
+           if (outlevel >= O_VERBOSE)
                outlevel = O_DEBUG;
            else
                outlevel = O_VERBOSE;
index 667835163a230a590be7f8a044a9302bd5866c3b..4c3c17d3e8ec4227904a853e11cf65c7bf0506c7 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -621,7 +621,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict )
        if (depth == 0 && !_depth0ck) {
                _depth0ck = 1;
                
-               if (outlevel == O_VERBOSE) {
+               if (outlevel >= O_VERBOSE) {
                        if ((i = X509_NAME_get_text_by_NID(issuer, NID_organizationName, buf, sizeof(buf))) != -1) {
                                report(stdout, GT_("Issuer Organization: %s\n"), buf);
                                if (i >= sizeof(buf) - 1)
@@ -636,7 +636,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict )
                                report(stdout, GT_("Unknown Issuer CommonName\n"));
                }
                if ((i = X509_NAME_get_text_by_NID(subj, NID_commonName, buf, sizeof(buf))) != -1) {
-                       if (outlevel == O_VERBOSE)
+                       if (outlevel >= O_VERBOSE)
                                report(stdout, GT_("Server CommonName: %s\n"), buf);
                        if (i >= sizeof(buf) - 1) {
                                /* Possible truncation. In this case, this is a DNS name, so this
@@ -661,7 +661,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict )
                                                if (gn->type == GEN_DNS) {
                                                        char *p1 = gn->d.ia5->data;
                                                        char *p2 = _ssl_server_cname;
-                                                       if (outlevel == O_VERBOSE)
+                                                       if (outlevel >= O_VERBOSE)
                                                                report(stderr, "Subject Alternative Name: %s\n", p1);
                                                        if (*p1 == '*') {
                                                                ++p1;
@@ -697,7 +697,7 @@ static int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict )
                                if (strict) return (0);
                        }
                } else {
-                       if (outlevel == O_VERBOSE)
+                       if (outlevel >= O_VERBOSE)
                                report(stdout, GT_("Unknown Server CommonName\n"));
                        if (ok_return && strict) {
                                report(stderr, GT_("Server name not specified in certificate!\n"));