gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: fix #6200


From: gnunet
Subject: [taler-exchange] branch master updated: fix #6200
Date: Wed, 22 Apr 2020 21:21:50 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new a039bf4d fix #6200
a039bf4d is described below

commit a039bf4d81b4e2c01da6d21a7e36f209853f0c3f
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Apr 22 21:21:48 2020 +0200

    fix #6200
---
 src/exchangedb/plugin_exchangedb_postgres.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index 5ecefe5e..4f57f32f 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -4001,9 +4001,9 @@ struct CoinHistoryContext
   struct PostgresClosure *pg;
 
   /**
-   * Set to transaction status.
+   * Set to 'true' if the transaction failed.
    */
-  enum GNUNET_DB_QueryStatus status;
+  bool failed;
 };
 
 
@@ -4064,7 +4064,7 @@ add_coin_deposit (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (deposit);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
     }
@@ -4124,7 +4124,7 @@ add_coin_melt (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (melt);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
     }
@@ -4187,7 +4187,7 @@ add_coin_refund (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (refund);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
     }
@@ -4253,7 +4253,7 @@ add_old_coin_recoup (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (recoup);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
       recoup->old_coin_pub = *chc->coin_pub;
@@ -4315,7 +4315,7 @@ add_coin_recoup (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (recoup);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
     }
@@ -4381,7 +4381,7 @@ add_coin_recoup_refresh (void *cls,
       {
         GNUNET_break (0);
         GNUNET_free (recoup);
-        chc->status = GNUNET_DB_STATUS_HARD_ERROR;
+        chc->failed = true;
         return;
       }
       recoup->coin.coin_pub = *chc->coin_pub;
@@ -4474,7 +4474,6 @@ postgres_get_coin_transactions (
   const struct Work *work;
   struct CoinHistoryContext chc = {
     .head = NULL,
-    .status = GNUNET_DB_STATUS_SUCCESS_ONE_RESULT,
     .coin_pub = coin_pub,
     .session = session,
     .pg = pg,
@@ -4493,14 +4492,14 @@ postgres_get_coin_transactions (
                                                work[i].cb,
                                                &chc);
     if ( (0 > qs) ||
-         (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != chc.status) )
+         (chc.failed) )
     {
       if (NULL != chc.head)
         common_free_coin_transaction_list (cls,
                                            chc.head);
       *tlp = NULL;
-      if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != chc.status)
-        qs = chc.status;
+      if (chc.failed)
+        qs = GNUNET_DB_STATUS_HARD_ERROR;
       return qs;
     }
   }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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