From: Marcus Brinkmann Date: Tue, 4 Feb 2003 16:08:50 +0000 (+0000) Subject: 2003-02-04 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~697 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1386bb64351d99c7ee289cdfb86347c13e10b29;p=gpgme.git 2003-02-04 Marcus Brinkmann * rungpg.c (read_status): If he status handler returns an error, return it. (status_handler): If read_status fails, just return the error. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index a122a7e..3c50700 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,9 @@ +2003-02-04 Marcus Brinkmann + + * rungpg.c (read_status): If he status handler returns an error, + return it. + (status_handler): If read_status fails, just return the error. + 2003-02-01 Marcus Brinkmann * engine-gpgsm.c (start): Handle all errors, not only most of diff --git a/trunk/gpgme/rungpg.c b/trunk/gpgme/rungpg.c index 74723e6..d55fbc6 100644 --- a/trunk/gpgme/rungpg.c +++ b/trunk/gpgme/rungpg.c @@ -808,7 +808,12 @@ read_status (GpgObject gpg) { gpg->status.eof = 1; if (gpg->status.fnc) - gpg->status.fnc (gpg->status.fnc_value, GPGME_STATUS_EOF, ""); + { + GpgmeError err; + err = gpg->status.fnc (gpg->status.fnc_value, GPGME_STATUS_EOF, ""); + if (err) + return err; + } return 0; } @@ -886,8 +891,11 @@ read_status (GpgObject gpg) } else if (gpg->status.fnc) { - gpg->status.fnc (gpg->status.fnc_value, - r->code, rest); + GpgmeError err; + err = gpg->status.fnc (gpg->status.fnc_value, + r->code, rest); + if (err) + return err; } if (r->code == GPGME_STATUS_END_STREAM) @@ -939,11 +947,7 @@ status_handler (void *opaque, int fd) assert (fd == gpg->status.fd[0]); err = read_status (gpg); if (err) - { - DEBUG1 ("gpg_handler: read_status problem %d\n - stop", err); - _gpgme_io_close (fd); - return err; - } + return err; if (gpg->status.eof) _gpgme_io_close (fd); return 0;