+2004-10-22 Marcus Brinkmann <marcus@g10code.de>
+
+ * engine-gpgsm.c (map_assuan_error): Return 0 if ERR is 0.
+ (start): Call map_assuan_error on return value of
+ assuan_write_line.
+
2004-10-05 Marcus Brinkmann <marcus@g10code.de>
* op-support.c (_gpgme_op_data_lookup): Use char pointer for
static gpgme_error_t
map_assuan_error (AssuanError err)
{
+ if (!err)
+ return 0;
+
if (err == -1)
return gpg_error (GPG_ERR_INV_ENGINE);
err = assuan_pipe_connect (&gpgsm->assuan_ctx,
_gpgme_get_gpgsm_path (), argv, child_fds);
+ /* FIXME: Check error. */
/* We need to know the fd used by assuan for reads. We do this by
using the assumption that the first returned fd from
err = add_io_cb (gpgsm, &gpgsm->message_cb, _gpgme_data_outbound_handler);
if (!err)
- err = assuan_write_line (gpgsm->assuan_ctx, command);
+ err = map_assuan_error (assuan_write_line (gpgsm->assuan_ctx, command));
if (!err)
(*gpgsm->io_cbs.event) (gpgsm->io_cbs.event_priv, GPGME_EVENT_START, NULL);