2003-02-05 Marcus Brinkmann <marcus@g10code.de>

* wait-user.c (_gpgme_wait_user_remove_io_cb): Move check for no
	I/O handlers left to ...
	(_gpgme_user_io_cb_handler): ... here.
This commit is contained in:
Marcus Brinkmann 2003-02-05 10:40:05 +00:00
parent d2992c518c
commit 7aaa379c44
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2003-02-05 Marcus Brinkmann <marcus@g10code.de>
* wait-user.c (_gpgme_wait_user_remove_io_cb): Move check for no
I/O handlers left to ...
(_gpgme_user_io_cb_handler): ... here.
2003-02-04 Marcus Brinkmann <marcus@g10code.de> 2003-02-04 Marcus Brinkmann <marcus@g10code.de>
* trustlist.c (trustlist_colon_handler): Release ITEM if name * trustlist.c (trustlist_colon_handler): Release ITEM if name

View File

@ -59,6 +59,16 @@ _gpgme_user_io_cb_handler (void *data, int fd)
_gpgme_io_close (ctx->fdt.fds[idx].fd); _gpgme_io_close (ctx->fdt.fds[idx].fd);
_gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err); _gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err);
} }
else
{
int i;
for (i = 0; i < ctx->fdt.size; i++)
if (ctx->fdt.fds[i].fd != -1)
break;
if (i == ctx->fdt.size)
_gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err);
}
return 0; return 0;
} }
@ -95,22 +105,12 @@ _gpgme_wait_user_remove_io_cb (void *data)
{ {
struct tag *tag = (struct tag *) data; struct tag *tag = (struct tag *) data;
GpgmeCtx ctx; GpgmeCtx ctx;
int i;
assert (tag); assert (tag);
ctx = tag->ctx; ctx = tag->ctx;
(*ctx->io_cbs.remove) (tag->user_tag); (*ctx->io_cbs.remove) (tag->user_tag);
_gpgme_remove_io_cb (data); _gpgme_remove_io_cb (data);
for (i = 0; i < ctx->fdt.size; i++)
if (ctx->fdt.fds[i].fd != -1)
break;
if (i == ctx->fdt.size)
{
GpgmeError err = 0;
_gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err);
}
} }