summaryrefslogtreecommitdiffstats
path: root/g10/mainproc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1999-05-06 14:26:10 +0200
committerWerner Koch <wk@gnupg.org>1999-05-06 14:26:10 +0200
commit7cb8838061a641c7f507a79fccc5e9a2f7a9c32f (patch)
tree2caf26a1ff44b3153de4daaa6ae61207af95c9d2 /g10/mainproc.c
parentSee ChangeLog: Tue May 4 15:49:29 CEST 1999 Werner Koch (diff)
downloadgnupg2-7cb8838061a641c7f507a79fccc5e9a2f7a9c32f.tar.xz
gnupg2-7cb8838061a641c7f507a79fccc5e9a2f7a9c32f.zip
See ChangeLog: Thu May 6 14:18:17 CEST 1999 Werner Koch
Diffstat (limited to 'g10/mainproc.c')
-rw-r--r--g10/mainproc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 024674e4a..9bfdaaf9a 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -215,7 +215,7 @@ proc_pubkey_enc( CTX c, PACKET *pkt )
else {
/* fixme: defer this message until we have parsed all packets of
* this type - do this by building a list of keys with their stati
- * and store it with the conetxt. do_proc_packets can then use
+ * and store it with the context. do_proc_packets can then use
* this list to display some information */
log_error(_("public key decryption failed: %s\n"), g10_errstr(result));
}
@@ -307,7 +307,7 @@ proc_plaintext( CTX c, PACKET *pkt )
md_enable( c->mfx.md, DIGEST_ALGO_SHA1 );
md_enable( c->mfx.md, DIGEST_ALGO_MD5 );
}
- #if 1
+ #if 0
#warning md_start_debug is enabled
md_start_debug( c->mfx.md, "verify" );
#endif
@@ -753,12 +753,13 @@ do_proc_packets( CTX c, IOBUF a )
{
PACKET *pkt = m_alloc( sizeof *pkt );
int rc=0;
+ int any_data=0;
int newpkt;
c->iobuf = a;
init_packet(pkt);
while( (rc=parse_packet(a, pkt)) != -1 ) {
-
+ any_data = 1;
if( rc ) {
free_packet(pkt);
if( rc == G10ERR_INVALID_PACKET )
@@ -844,7 +845,13 @@ do_proc_packets( CTX c, IOBUF a )
else
free_packet(pkt);
}
- rc = 0;
+ if( rc == G10ERR_INVALID_PACKET )
+ write_status_text( STATUS_NODATA, "3" );
+ if( any_data )
+ rc = 0;
+ else if( rc == -1 )
+ write_status_text( STATUS_NODATA, "2" );
+
leave:
release_list( c );