From 7aaa379c44c614bc897a86e21c8dadb38383bb23 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Wed, 5 Feb 2003 10:40:05 +0000 Subject: [PATCH] 2003-02-05 Marcus Brinkmann * wait-user.c (_gpgme_wait_user_remove_io_cb): Move check for no I/O handlers left to ... (_gpgme_user_io_cb_handler): ... here. --- gpgme/ChangeLog | 6 ++++++ gpgme/wait-user.c | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 78d2b46..be470eb 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,9 @@ +2003-02-05 Marcus Brinkmann + + * 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 * trustlist.c (trustlist_colon_handler): Release ITEM if name diff --git a/gpgme/wait-user.c b/gpgme/wait-user.c index e148491..02a6076 100644 --- a/gpgme/wait-user.c +++ b/gpgme/wait-user.c @@ -59,6 +59,16 @@ _gpgme_user_io_cb_handler (void *data, int fd) _gpgme_io_close (ctx->fdt.fds[idx].fd); _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; } @@ -95,22 +105,12 @@ _gpgme_wait_user_remove_io_cb (void *data) { struct tag *tag = (struct tag *) data; GpgmeCtx ctx; - int i; assert (tag); ctx = tag->ctx; (*ctx->io_cbs.remove) (tag->user_tag); _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); - } } -- 2.26.2