2003-02-04 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (read_status): If he status handler returns an error, return it. (status_handler): If read_status fails, just return the error.
This commit is contained in:
parent
350ef9afef
commit
7f0efb1923
@ -1,3 +1,9 @@
|
|||||||
|
2003-02-04 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
|
* 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 <marcus@g10code.de>
|
2003-02-01 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* engine-gpgsm.c (start): Handle all errors, not only most of
|
* engine-gpgsm.c (start): Handle all errors, not only most of
|
||||||
|
@ -808,7 +808,12 @@ read_status (GpgObject gpg)
|
|||||||
{
|
{
|
||||||
gpg->status.eof = 1;
|
gpg->status.eof = 1;
|
||||||
if (gpg->status.fnc)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,8 +891,11 @@ read_status (GpgObject gpg)
|
|||||||
}
|
}
|
||||||
else if (gpg->status.fnc)
|
else if (gpg->status.fnc)
|
||||||
{
|
{
|
||||||
gpg->status.fnc (gpg->status.fnc_value,
|
GpgmeError err;
|
||||||
r->code, rest);
|
err = gpg->status.fnc (gpg->status.fnc_value,
|
||||||
|
r->code, rest);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->code == GPGME_STATUS_END_STREAM)
|
if (r->code == GPGME_STATUS_END_STREAM)
|
||||||
@ -939,11 +947,7 @@ status_handler (void *opaque, int fd)
|
|||||||
assert (fd == gpg->status.fd[0]);
|
assert (fd == gpg->status.fd[0]);
|
||||||
err = read_status (gpg);
|
err = read_status (gpg);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
return err;
|
||||||
DEBUG1 ("gpg_handler: read_status problem %d\n - stop", err);
|
|
||||||
_gpgme_io_close (fd);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
if (gpg->status.eof)
|
if (gpg->status.eof)
|
||||||
_gpgme_io_close (fd);
|
_gpgme_io_close (fd);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user