gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] 01/02: related to #6774: rollback before starting async


From: gnunet
Subject: [taler-merchant] 01/02: related to #6774: rollback before starting async activity
Date: Thu, 04 Mar 2021 10:56:21 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 170616949a7ed86662a79a95ec8f4ffeacc449f1
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Mar 4 10:55:22 2021 +0100

    related to #6774: rollback before starting async activity
---
 src/backend/taler-merchant-httpd_post-tips-ID-pickup.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c 
b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
index 4ac68578..797d6f25 100644
--- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
+++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
@@ -817,10 +817,17 @@ RETRY:
       qs = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT;
     if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs)
     {
+      bool rollback = false;
+
       for (unsigned int i = 0; i< pc->planchets_length; i++)
       {
         if (NULL == sigs[i])
         {
+          if (! rollback)
+          {
+            TMH_db->rollback (TMH_db->cls);
+            rollback = true;
+          }
           try_withdraw (pc,
                         exchange_url,
                         &pc->planchets[i],
@@ -830,7 +837,6 @@ RETRY:
       }
       if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
       {
-        TMH_db->rollback (TMH_db->cls);
         MHD_suspend_connection (connection);
         GNUNET_CONTAINER_DLL_insert (pc_head,
                                      pc_tail,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]