gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated (d773c25f -> b21ae427)


From: gnunet
Subject: [taler-merchant] branch master updated (d773c25f -> b21ae427)
Date: Thu, 04 Mar 2021 10:56:20 +0100

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

grothoff pushed a change to branch master
in repository merchant.

    from d773c25f -add comment
     new 17061694 related to #6774: rollback before starting async activity
     new b21ae427 related to #6774: rollback AND suspend before starting async 
activity

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../taler-merchant-httpd_post-tips-ID-pickup.c     | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

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..4809fee8 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,24 @@ 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);
+            MHD_suspend_connection (connection);
+            GNUNET_CONTAINER_DLL_insert (pc_head,
+                                         pc_tail,
+                                         pc);
+            pc->tt = GNUNET_SCHEDULER_add_delayed (EXCHANGE_TIMEOUT,
+                                                   &do_timeout,
+                                                   pc);
+            rollback = true;
+          }
           try_withdraw (pc,
                         exchange_url,
                         &pc->planchets[i],
@@ -828,18 +842,8 @@ RETRY:
           qs = GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
         }
       }
-      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,
-                                     pc);
-        pc->tt = GNUNET_SCHEDULER_add_delayed (EXCHANGE_TIMEOUT,
-                                               &do_timeout,
-                                               pc);
+      if (rollback)
         return MHD_YES;
-      }
     }
     if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != qs)
     {

-- 
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]