[svn] GnuPG - r3853 - trunk/g10

svn author dshaw cvs at cvs.gnupg.org
Thu Aug 4 23:41:12 CEST 2005


Author: dshaw
Date: 2005-08-04 23:41:11 +0200 (Thu, 04 Aug 2005)
New Revision: 3853

Modified:
   trunk/g10/ChangeLog
   trunk/g10/keygen.c
Log:
* keygen.c (write_keyblock): Don't try and build deleted kbnodes since
we start our tree with one.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2005-08-04 21:39:43 UTC (rev 3852)
+++ trunk/g10/ChangeLog	2005-08-04 21:41:11 UTC (rev 3853)
@@ -1,7 +1,7 @@
 2005-08-04  David Shaw  <dshaw at jabberwocky.com>
 
-	* keygen.c (start_tree): Need to use an actual packet type (which
-	we can then delete) to start the tree.
+	* keygen.c (write_keyblock): Don't try and build deleted kbnodes
+	since we start our tree with one.
 
 2005-08-04  Werner Koch  <wk at g10code.com>
 

Modified: trunk/g10/keygen.c
===================================================================
--- trunk/g10/keygen.c	2005-08-04 21:39:43 UTC (rev 3852)
+++ trunk/g10/keygen.c	2005-08-04 21:41:11 UTC (rev 3853)
@@ -3222,15 +3222,21 @@
 static int
 write_keyblock( IOBUF out, KBNODE node )
 {
-    for( ; node ; node = node->next ) {
-	int rc = build_packet( out, node->pkt );
-	if( rc ) {
-	    log_error("build_packet(%d) failed: %s\n",
+  for( ; node ; node = node->next )
+    {
+      if(!is_deleted_kbnode(node))
+	{
+	  int rc = build_packet( out, node->pkt );
+	  if( rc )
+	    {
+	      log_error("build_packet(%d) failed: %s\n",
 			node->pkt->pkttype, g10_errstr(rc) );
-	    return G10ERR_WRITE_FILE;
+	      return G10ERR_WRITE_FILE;
+	    }
 	}
     }
-    return 0;
+
+  return 0;
 }
 
 




More information about the Gnupg-commits mailing list