anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 6ebf85ec88c8875dc2ca712593fdb09b73be0a36
parent dba4c72d90d9e9ee7d7c19044f158d010684a7dc
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 29 Jul 2026 17:16:10 +0200

only link a policy upload into the suspend list once it is actually suspended

Diffstat:
Msrc/backend/anastasis-httpd_policy-upload.c | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/backend/anastasis-httpd_policy-upload.c b/src/backend/anastasis-httpd_policy-upload.c @@ -573,9 +573,6 @@ begin_payment (struct PolicyUploadContext *puc) { json_t *order; - GNUNET_CONTAINER_DLL_insert (puc_head, - puc_tail, - puc); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Suspending connection while creating order at `%s'\n", AH_backend_url); @@ -614,15 +611,19 @@ begin_payment (struct PolicyUploadContext *puc) if (NULL == order) { GNUNET_break (0); - GNUNET_CONTAINER_DLL_remove (puc_head, - puc_tail, - puc); return TALER_MHD_reply_with_error (puc->con, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE, "could not create order"); } } + /* Only link into the list once we are actually about to suspend: the list + exists to resume suspended connections at shutdown, and cleanup_ctx() + frees the context without unlinking it, so an error return above would + otherwise leave a dangling entry behind. */ + GNUNET_CONTAINER_DLL_insert (puc_head, + puc_tail, + puc); MHD_suspend_connection (puc->con); puc->po = TALER_MERCHANT_post_private_orders_create (AH_ctx, AH_backend_url,