gpgme/gpgme (ChangeLog wait-global.c)
cvs user marcus
cvs at cvs.gnupg.org
Thu Apr 14 10:33:03 CEST 2005
Date: Thursday, April 14, 2005 @ 10:49:20
Author: marcus
Path: /cvs/gpgme/gpgme/gpgme
Modified: ChangeLog wait-global.c
2005-04-14 Marcus Brinkmann <marcus at g10code.de>
* wait-global.c (gpgme_wait): Use LI->ctx when checking a context
in the list, not the user-provided CTX.
---------------+
ChangeLog | 4 ++++
wait-global.c | 10 ++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
Index: gpgme/gpgme/ChangeLog
diff -u gpgme/gpgme/ChangeLog:1.395 gpgme/gpgme/ChangeLog:1.396
--- gpgme/gpgme/ChangeLog:1.395 Thu Apr 14 10:41:12 2005
+++ gpgme/gpgme/ChangeLog Thu Apr 14 10:49:20 2005
@@ -1,5 +1,9 @@
2005-04-14 Marcus Brinkmann <marcus at g10code.de>
+ * wait-global.c (gpgme_wait): Use LI->ctx when checking a context
+ in the list, not the user-provided CTX.
+ Reported by Igor Belyi <gpgme at katehok.ac93.org>.
+
* wait-global.c (gpgme_wait): If no context is found, and we
should not hang, set *status to 0 and return NULL.
Reported by Igor Belyi <gpgme at katehok.ac93.org>.
Index: gpgme/gpgme/wait-global.c
diff -u gpgme/gpgme/wait-global.c:1.14 gpgme/gpgme/wait-global.c:1.15
--- gpgme/gpgme/wait-global.c:1.14 Thu Apr 14 10:45:00 2005
+++ gpgme/gpgme/wait-global.c Thu Apr 14 10:49:20 2005
@@ -331,13 +331,15 @@
LOCK (ctx_list_lock);
for (li = ctx_active_list; li; li = li->next)
{
- for (i = 0; i < ctx->fdt.size; i++)
- if (ctx->fdt.fds[i].fd != -1)
+ gpgme_ctx_t actx = li->ctx;
+
+ for (i = 0; i < actx->fdt.size; i++)
+ if (actx->fdt.fds[i].fd != -1)
break;
- if (i == ctx->fdt.size)
+ if (i == actx->fdt.size)
{
gpgme_error_t err = 0;
- _gpgme_engine_io_event (ctx->engine, GPGME_EVENT_DONE, &err);
+ _gpgme_engine_io_event (actx->engine, GPGME_EVENT_DONE, &err);
}
}
UNLOCK (ctx_list_lock);
More information about the Gnupg-commits
mailing list