exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 535ba4559e7d43ac9fbcf435fd7922d011241c9f
parent 8b1d1d3cdc0bed4f3d8960dce80f33781e40f8cc
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  1 May 2025 00:10:01 +0200

prevent accidental double-remove from DLL after shutdown-wakeup

Diffstat:
Msrc/exchange/taler-exchange-httpd_withdraw.c | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_withdraw.c b/src/exchange/taler-exchange-httpd_withdraw.c @@ -295,18 +295,21 @@ struct WithdrawContext */ #define SET_ERROR(wc, ec) \ do \ - { (wc)->error.code = (ec); \ + { GNUNET_static_assert (WITHDRAW_ERROR_NONE != wc->error.code); \ + (wc)->error.code = (ec); \ (wc)->phase = WITHDRAW_PHASE_GENERATE_REPLY_ERROR; } while (0) #define SET_ERROR_WITH_FIELD(wc, ec, field) \ do \ - { (wc)->error.code = (ec); \ + { GNUNET_static_assert (WITHDRAW_ERROR_NONE != wc->error.code); \ + (wc)->error.code = (ec); \ (wc)->error.details.field = (field); \ (wc)->phase = WITHDRAW_PHASE_GENERATE_REPLY_ERROR; } while (0) #define SET_ERROR_WITH_DETAIL(wc, ec, field, value) \ do \ - { (wc)->error.code = (ec); \ + { GNUNET_static_assert (WITHDRAW_ERROR_NONE != wc->error.code); \ + (wc)->error.code = (ec); \ (wc)->error.details.field = (value); \ (wc)->phase = WITHDRAW_PHASE_GENERATE_REPLY_ERROR; } while (0) @@ -327,6 +330,7 @@ TEH_withdraw_cleanup () GNUNET_CONTAINER_DLL_remove (wc_head, wc_tail, wc); + wc->phase = WITHDRAW_PHASE_RETURN_NO; MHD_resume_connection (wc->rc->connection); } }