commit 79dae0dbd30242ab8907612dfec88f8686c31562
parent d7a9737debb859fe91298f5d06763f8364314ce9
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Thu, 12 Dec 2024 16:35:32 +0100
bug fix
Diffstat:
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
@@ -510,6 +510,7 @@ handle_mhd_completion_callback (void *cls,
json_decref (hc->request_body);
if (NULL != hc->instance)
TMH_instance_decref (hc->instance);
+ TMH_db->preflight(TMH_db->cls);
GNUNET_free (hc->full_url);
GNUNET_free (hc);
*con_cls = NULL;
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -2240,6 +2240,7 @@ phase_execute_pay_transaction (struct PayContext *pc)
else if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
/* UNIQUE constraint violation, meaning this token was already used. */
+ TMH_db->rollback (TMH_db->cls);
pay_end (pc,
TALER_MHD_reply_with_error (pc->connection,
MHD_HTTP_CONFLICT,
@@ -2274,6 +2275,7 @@ phase_execute_pay_transaction (struct PayContext *pc)
}
if (pc->deposit_currency_mismatch)
{
+ TMH_db->rollback (TMH_db->cls);
GNUNET_break_op (0);
pay_end (pc,
TALER_MHD_reply_with_error (pc->connection,
diff --git a/src/backend/taler-merchant-httpd_private-get-donau-instances.c b/src/backend/taler-merchant-httpd_private-get-donau-instances.c
@@ -95,6 +95,7 @@ TMH_private_get_donau_instances (const struct TMH_RequestHandler *rh,
enum GNUNET_DB_QueryStatus qs;
GNUNET_assert (NULL != json_donau_instances);
+ TMH_db->preflight(TMH_db->cls);
qs = TMH_db->select_donau_instance(TMH_db->cls,
&add_donau_instance,
json_donau_instances);