From 197fb96bf720d0d6978b3d8a2afe9118efe8fd18 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 14 Apr 2005 08:41:12 +0000 Subject: [PATCH] 2005-04-14 Marcus Brinkmann * 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 . --- trunk/gpgme/ChangeLog | 6 ++++++ trunk/gpgme/wait-global.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 6ee994d..d993d47 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,9 @@ +2005-04-14 Marcus Brinkmann + + * 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 . + 2005-03-24 Marcus Brinkmann * data.h (EOPNOTSUPP) [_WIN32]: Remove definition. diff --git a/trunk/gpgme/wait-global.c b/trunk/gpgme/wait-global.c index 17e57dd..7de72f7 100644 --- a/trunk/gpgme/wait-global.c +++ b/trunk/gpgme/wait-global.c @@ -350,6 +350,12 @@ gpgme_wait (gpgme_ctx_t ctx, gpgme_error_t *status, int hang) ctx = dctx; hang = 0; } + else if (!hang) + { + ctx = NULL; + if (status) + *status = NULL; + } } } while (hang); -- 2.26.2