From d104a3c8c3fafe6dd9bb56cae91fae60c651ff80 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Aug 2021 20:28:14 +0200 Subject: -fix assertion --- src/backend/anastasis-httpd_truth.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/backend/anastasis-httpd_truth.c b/src/backend/anastasis-httpd_truth.c index 4853e15..19f8b6b 100644 --- a/src/backend/anastasis-httpd_truth.c +++ b/src/backend/anastasis-httpd_truth.c @@ -1117,6 +1117,10 @@ AH_handler_truth_get ( } /* end of first-time initialization (if NULL == gc) */ else { + /* might have been woken up by authorization plugin, + so clear the flag. MDH called us, so we are + clearly no longer suspended */ + gc->suspended = false; if (NULL != gc->resp) { MHD_RESULT ret; @@ -1544,11 +1548,13 @@ AH_handler_truth_get ( TALER_EC_ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED, NULL); } - GNUNET_assert (! gc->in_list); - gc->in_list = true; - GNUNET_CONTAINER_DLL_insert (gc_head, - gc_tail, - gc); + if (! gc->in_list) + { + gc->in_list = true; + GNUNET_CONTAINER_DLL_insert (gc_head, + gc_tail, + gc); + } GNUNET_assert (! gc->suspended); return run_authorization_process (connection, gc); -- cgit v1.2.3