Fixed an update conflict.
This commit is contained in:
parent
6676c74b6a
commit
b94497bf1f
@ -166,6 +166,14 @@
|
|||||||
* engine-gpgsm.c (_gpgme_gpgsm_add_io_cb): Call IO_CBS->add with
|
* engine-gpgsm.c (_gpgme_gpgsm_add_io_cb): Call IO_CBS->add with
|
||||||
new argument, fix up error handling.
|
new argument, fix up error handling.
|
||||||
|
|
||||||
|
2002-07-03 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* encrypt.c (status_handler_finish): New.
|
||||||
|
(_gpgme_encrypt_status_handler): Moved some code out to the new
|
||||||
|
function and call this function also in case we get into the
|
||||||
|
status handler with an error which might happen due to a kludge in
|
||||||
|
engine-gpgsm.c
|
||||||
|
|
||||||
2002-06-28 Marcus Brinkmann <marcus@g10code.de>
|
2002-06-28 Marcus Brinkmann <marcus@g10code.de>
|
||||||
|
|
||||||
* keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
|
* keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
|
||||||
|
@ -99,26 +99,38 @@ append_xml_encinfo (GpgmeData *rdh, char *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
status_handler_finish (GpgmeCtx ctx)
|
||||||
|
{
|
||||||
|
if (ctx->result.encrypt->xmlinfo)
|
||||||
|
{
|
||||||
|
append_xml_encinfo (&ctx->result.encrypt->xmlinfo, NULL);
|
||||||
|
_gpgme_set_op_info (ctx, ctx->result.encrypt->xmlinfo);
|
||||||
|
ctx->result.encrypt->xmlinfo = NULL;
|
||||||
|
}
|
||||||
|
if (ctx->error)
|
||||||
|
; /* already set by kludge in engine-gpgsm */
|
||||||
|
else if (ctx->result.encrypt->no_valid_recipients)
|
||||||
|
ctx->error = mk_error (No_Recipients);
|
||||||
|
else if (ctx->result.encrypt->invalid_recipients)
|
||||||
|
ctx->error = mk_error (Invalid_Recipients);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gpgme_encrypt_status_handler (GpgmeCtx ctx, GpgmeStatusCode code, char *args)
|
_gpgme_encrypt_status_handler (GpgmeCtx ctx, GpgmeStatusCode code, char *args)
|
||||||
{
|
{
|
||||||
if (ctx->error)
|
if (ctx->error)
|
||||||
return;
|
{
|
||||||
|
if (ctx->result.encrypt) /* check that we have allocated it. */
|
||||||
|
status_handler_finish (ctx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
test_and_allocate_result (ctx, encrypt);
|
test_and_allocate_result (ctx, encrypt);
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case GPGME_STATUS_EOF:
|
case STATUS_EOF:
|
||||||
if (ctx->result.encrypt->xmlinfo)
|
status_handler_finish (ctx);
|
||||||
{
|
|
||||||
append_xml_encinfo (&ctx->result.encrypt->xmlinfo, NULL);
|
|
||||||
_gpgme_set_op_info (ctx, ctx->result.encrypt->xmlinfo);
|
|
||||||
ctx->result.encrypt->xmlinfo = NULL;
|
|
||||||
}
|
|
||||||
if (ctx->result.encrypt->no_valid_recipients)
|
|
||||||
ctx->error = mk_error (No_Recipients);
|
|
||||||
else if (ctx->result.encrypt->invalid_recipients)
|
|
||||||
ctx->error = mk_error (Invalid_Recipients);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GPGME_STATUS_INV_RECP:
|
case GPGME_STATUS_INV_RECP:
|
||||||
|
Loading…
Reference in New Issue
Block a user