[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 01/03: terminate exchange interactions if we get an err
From: |
gnunet |
Subject: |
[taler-merchant] 01/03: terminate exchange interactions if we get an error |
Date: |
Mon, 22 Jan 2024 22:15:03 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit be699a7703efee2ce651e2c6c43cf15852d4d16e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jan 22 22:02:24 2024 +0100
terminate exchange interactions if we get an error
---
src/backend/taler-merchant-httpd_post-orders-ID-pay.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index 8a5b7993..dddac983 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -652,6 +652,23 @@ resume_pay_with_response (struct PayContext *pc,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Resuming /pay handling. HTTP status for our reply is %u.\n",
response_code);
+ for (unsigned int i = 0; i<pc->num_exchanges; i++)
+ {
+ struct ExchangeGroup *eg = pc->egs[i];
+
+ if (NULL != eg->fo)
+ {
+ TMH_EXCHANGES_keys4exchange_cancel (eg->fo);
+ eg->fo = NULL;
+ pc->pending_at_eg--;
+ }
+ if (NULL != eg->bdh)
+ {
+ TALER_EXCHANGE_batch_deposit_cancel (eg->bdh);
+ eg->bdh = NULL;
+ }
+ }
+ GNUNET_assert (0 == pc->pending_at_eg);
if (NULL != pc->timeout_task)
{
GNUNET_SCHEDULER_cancel (pc->timeout_task);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.