2003-10-06 Marcus Brinkmann <marcus@g10code.de>

* engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible
	error.
This commit is contained in:
Marcus Brinkmann 2003-10-06 19:12:50 +00:00
parent e702f52860
commit ccb90f4e4d
2 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2003-10-06 Marcus Brinkmann <marcus@g10code.de> 2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible
error.
* io.h (_gpgme_io_subsystem_init): New prototype. * io.h (_gpgme_io_subsystem_init): New prototype.
* posix-io.c (_gpgme_io_subsystem_init): Add function. * posix-io.c (_gpgme_io_subsystem_init): Add function.
(_gpgme_io_spawn): Do not fixup signal handler here. (_gpgme_io_spawn): Do not fixup signal handler here.

View File

@ -152,6 +152,9 @@ close_notify_handler (int fd, void *opaque)
static gpgme_error_t static gpgme_error_t
map_assuan_error (AssuanError err) map_assuan_error (AssuanError err)
{ {
if (err == -1)
return gpg_error (GPG_ERR_GENERAL);
/* New code will use gpg_error_t values. */ /* New code will use gpg_error_t values. */
if (gpg_err_source (err)) if (gpg_err_source (err))
return (gpgme_error_t) err; return (gpgme_error_t) err;