gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] 02/04: handle TALER_EXCHANGEDB_RO_PAYBACK_


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 02/04: handle TALER_EXCHANGEDB_RO_PAYBACK_COIN in DB balance calulations
Date: Mon, 03 Apr 2017 16:37:28 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit c9995bd758985f6e970e53a62804a423b889994e
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Apr 3 13:59:01 2017 +0200

    handle  TALER_EXCHANGEDB_RO_PAYBACK_COIN in DB balance calulations
---
 src/exchange/taler-exchange-httpd_db.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/exchange/taler-exchange-httpd_db.c 
b/src/exchange/taler-exchange-httpd_db.c
index 23a5929..f2cd2b3 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -764,6 +764,23 @@ execute_reserve_withdraw_transaction (struct 
MHD_Connection *connection,
         }
       res |= 2;
       break;
+
+    case TALER_EXCHANGEDB_RO_PAYBACK_COIN:
+      if (0 == (res & 1))
+        deposit_total = pos->details.payback->value;
+      else
+        if (GNUNET_OK !=
+            TALER_amount_add (&deposit_total,
+                              &deposit_total,
+                              &pos->details.payback->value))
+        {
+          TEH_plugin->rollback (TEH_plugin->cls,
+                                session);
+          return TEH_RESPONSE_reply_internal_db_error (connection,
+                                                      
TALER_EC_WITHDRAW_AMOUNT_DEPOSITS_OVERFLOW);
+        }
+      res |= 1;
+      break;
     }
   }
   if (0 == (res & 1))

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



reply via email to

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