[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: fix warnings
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: fix warnings |
Date: |
Thu, 08 Jun 2017 15:32:09 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new cac9a38 fix warnings
cac9a38 is described below
commit cac9a386127ce68c9c7a122623d7a3bbdf951029
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jun 8 15:32:19 2017 +0200
fix warnings
---
.../taler-merchant-httpd_track-transaction.c | 2 ++
src/backend/taler-merchant-httpd_track-transfer.c | 2 ++
src/backenddb/plugin_merchantdb_postgres.c | 22 +++++++++++++++++++++-
src/backenddb/test_merchantdb.c | 2 +-
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_track-transaction.c
b/src/backend/taler-merchant-httpd_track-transaction.c
index e9610ae..9d8768f 100644
--- a/src/backend/taler-merchant-httpd_track-transaction.c
+++ b/src/backend/taler-merchant-httpd_track-transaction.c
@@ -793,6 +793,7 @@ transfer_cb (void *cls,
* @param coin_pub public key of the coin
* @param amount_with_fee amount the exchange will deposit for this coin
* @param deposit_fee fee the exchange will charge for this coin
+ * @param refund_fee fee the exchange will charge for refunding this coin
* @param exchange_proof proof from exchange that coin was accepted
*/
static void
@@ -801,6 +802,7 @@ coin_cb (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
+ const struct TALER_Amount *refund_fee,
const json_t *exchange_proof)
{
struct TrackTransactionContext *tctx = cls;
diff --git a/src/backend/taler-merchant-httpd_track-transfer.c
b/src/backend/taler-merchant-httpd_track-transfer.c
index 3df9703..b8644be 100644
--- a/src/backend/taler-merchant-httpd_track-transfer.c
+++ b/src/backend/taler-merchant-httpd_track-transfer.c
@@ -418,6 +418,7 @@ track_transfer_cleanup (struct TM_HandlerContext *hc)
* @param coin_pub public key of the coin
* @param amount_with_fee amount the exchange will transfer for this coin
* @param deposit_fee fee the exchange will charge for this coin
+ * @param refund_fee fee the exchange will charge for refunding this coin
* @param exchange_proof proof from exchange that coin was accepted
*/
static void
@@ -426,6 +427,7 @@ check_transfer (void *cls,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
+ const struct TALER_Amount *refund_fee,
const json_t *exchange_proof)
{
struct TrackTransferContext *rctx = cls;
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index 1ac8d4e..15ebbf1 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -1632,7 +1632,27 @@ postgres_increase_refund_for_contract (void *cls,
2 "Spread" the refund amount among those coins
3 Store the solution into table merchant_refund */
- return GNUNET_SYSERR;
+ struct PostgresClosure *pg = cls;
+ PGresult *result;
+ unsigned int i;
+
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_auto_from_type (h_contract_terms),
+ GNUNET_PQ_query_param_end
+ };
+
+ result = GNUNET_PQ_exec_prepared (pg->conn,
+ "get_refund_information",
+ params);
+
+ if (PGRES_TUPLES_OK != PQresultStatus (result))
+ {
+ BREAK_DB_ERR (result);
+ PQclear (result);
+ return GNUNET_SYSERR;
+ }
+
+ return GNUNET_OK;
}
/**
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index c085737..f249140 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -536,7 +536,7 @@ run (void *cls)
&h_contract_terms,
&refund_cb,
NULL));
- FAILIF (GNUNET_SYSERR !=
+ FAILIF (GNUNET_OK !=
plugin->increase_refund_for_contract (plugin->cls,
&h_contract_terms,
&refund_amount,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: fix warnings,
gnunet <=