[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 03/04: handle TALER_EXCHANGEDB_RO_EXCHANGE
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 03/04: handle TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK in DB balance calulations |
Date: |
Mon, 03 Apr 2017 16:37:29 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 5b867c4b8ece4b4f92ff206fa75a4ea29d870221
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Apr 3 15:37:33 2017 +0200
handle TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK 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 f2cd2b3..3dc4a32 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -781,6 +781,23 @@ execute_reserve_withdraw_transaction (struct
MHD_Connection *connection,
}
res |= 1;
break;
+
+ case TALER_EXCHANGEDB_RO_EXCHANGE_TO_BANK:
+ if (0 == (res & 2))
+ withdraw_total = pos->details.bank->amount;
+ else
+ if (GNUNET_OK !=
+ TALER_amount_add (&withdraw_total,
+ &withdraw_total,
+ &pos->details.bank->amount))
+ {
+ TEH_plugin->rollback (TEH_plugin->cls,
+ session);
+ return TEH_RESPONSE_reply_internal_db_error (connection,
+
TALER_EC_WITHDRAW_AMOUNT_WITHDRAWALS_OVERFLOW);
+ }
+ res |= 2;
+ break;
}
}
if (0 == (res & 1))
--
To stop receiving notification emails like this one, please contact
address@hidden