From b2749d77da7d55992ee7811b3a86ef031f91b7ce Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 14 Jun 2019 13:53:43 +0200 Subject: [PATCH] core: Make the refactored user event loop work. * src/wait.c (user_io_cb_handler): Set FD signaled. -- With this patch the regression test suite now passes. Signed-off-by: Werner Koch --- src/wait.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wait.c b/src/wait.c index 091a93b9..98d541b2 100644 --- a/src/wait.c +++ b/src/wait.c @@ -51,6 +51,7 @@ user_io_cb_handler (void *data, int fd) uint64_t serial; gpgme_ctx_t ctx; gpg_error_t op_err; + struct io_select_s iosel; (void)fd; @@ -58,6 +59,12 @@ user_io_cb_handler (void *data, int fd) serial = tag->serial; assert (serial); + iosel.fd = fd; + iosel.for_read = 0; /* we don't care. */ + iosel.for_write = 0; /* we don't care. */ + iosel.signaled = 1; /* we are only called when I/O is pending. */ + _gpgme_fdtable_set_signaled (&iosel, 1); + err = _gpgme_fdtable_run_io_cbs (serial, &op_err, NULL); if (err || op_err) ;