[git] GnuPG - branch, master, updated. gnupg-2.1.13-54-g52f6528

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Jun 28 09:01:54 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  52f65281f9743c42a48bf5a3354c9ab0ecdb681a (commit)
      from  b6872353bae778d11730f5d0afd2192750777647 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 52f65281f9743c42a48bf5a3354c9ab0ecdb681a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jun 28 15:56:48 2016 +0900

    g10: Fix --list-packets.
    
    * g10/gpg.c (main): Call set_packet_list_mode after assignment of
    opt.list_packets.
    * g10/mainproc.c (do_proc_packets): Don't stop processing with
    --list-packets as the comment says.
    * g10/options.h (list_packets): Fix the comment.
    * g10/parse-packet.c: Fix the condition for opt.list_packets.
    
    --
    
    Debian-bug-id: 828109
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/gpg.c b/g10/gpg.c
index ef27562..9750c57 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4656,7 +4656,6 @@ main (int argc, char **argv)
 	break;
 
       case aListPackets:
-	opt.list_packets=2;
       default:
 	if( argc > 1 )
 	    wrong_args(_("[filename]"));
@@ -4685,8 +4684,8 @@ main (int argc, char **argv)
 		}
 	    }
 	    if( cmd == aListPackets ) {
-		set_packet_list_mode(1);
 		opt.list_packets=1;
+		set_packet_list_mode(1);
 	    }
 	    rc = proc_packets (ctrl, NULL, a );
 	    if( rc )
diff --git a/g10/mainproc.c b/g10/mainproc.c
index bd738ab..c191fe0 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -1328,7 +1328,7 @@ do_proc_packets (ctrl_t ctrl, CTX c, iobuf_t a)
           /* Stop processing when an invalid packet has been encountered
            * but don't do so when we are doing a --list-packets.  */
           if (gpg_err_code (rc) == GPG_ERR_INV_PACKET
-              && opt.list_packets != 2 )
+              && opt.list_packets == 0)
             break;
           continue;
 	}
diff --git a/g10/options.h b/g10/options.h
index 4279bd6..fc333cd 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -80,7 +80,7 @@ struct
   int print_pka_records;
   int print_dane_records;
   int no_armor;
-  int list_packets; /* list-packets mode: 1=normal, 2=invoked by command*/
+  int list_packets; /* Option --list-packets active.  */
   int def_cipher_algo;
   int force_mdc;
   int disable_mdc;
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 1c1b389..ec8a641 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -211,7 +211,7 @@ set_packet_list_mode (int mode)
      enable the list mode only with a special option. */
   if (!listfp)
     {
-      if (opt.list_packets == 2)
+      if (opt.list_packets)
         {
           listfp = es_stdout;
           if (opt.verbose)

-----------------------------------------------------------------------

Summary of changes:
 g10/gpg.c          | 3 +--
 g10/mainproc.c     | 2 +-
 g10/options.h      | 2 +-
 g10/parse-packet.c | 2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list