[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: 5732.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: 5732. |
Date: |
Mon, 27 May 2019 15:52:12 +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 3e295bc 5732.
3e295bc is described below
commit 3e295bc2facf85bdf7f1c4f2a1cbe984df510909
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon May 27 15:51:41 2019 +0200
5732.
Not en error, just the log level was set wrong.
---
src/backend/taler-merchant-httpd_refund.c | 3 ++-
src/backenddb/plugin_merchantdb_postgres.c | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_refund.c
b/src/backend/taler-merchant-httpd_refund.c
index 0b59ebb..1a2a0f8 100644
--- a/src/backend/taler-merchant-httpd_refund.c
+++ b/src/backend/taler-merchant-httpd_refund.c
@@ -238,9 +238,10 @@ MH_handler_refund_increase (struct TMH_RequestHandler *rh,
&mi->pubkey,
&refund,
reason);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"increase refund returned %d\n",
qs);
+
if (GNUNET_DB_STATUS_HARD_ERROR == qs)
{
GNUNET_break (0);
diff --git a/src/backenddb/plugin_merchantdb_postgres.c
b/src/backenddb/plugin_merchantdb_postgres.c
index db99219..3468994 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -371,7 +371,6 @@ postgres_initialize (void *cls)
"COMMIT",
0),
- /*NOTE: minimal version, to be expanded on a needed basis*/
GNUNET_PQ_make_prepare ("find_refunds",
"SELECT"
" refund_amount_val"
@@ -2634,7 +2633,9 @@ process_deposits_for_refund_cb (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Total existing refund is %s\n",
TALER_amount2s (¤t_refund));
- /* stop immediately if we are done */
+
+ /* stop immediately if we are 'done' === amount already
+ * refunded. */
if (0 >= TALER_amount_cmp (ctx->refund,
¤t_refund))
{
@@ -2670,7 +2671,7 @@ process_deposits_for_refund_cb (void *cls,
continue;
}
- /* How much of the refund is left? */
+ /* How much of the refund is still to be paid back? */
if (GNUNET_SYSERR ==
TALER_amount_subtract (&remaining_refund,
ctx->refund,
@@ -2729,6 +2730,7 @@ process_deposits_for_refund_cb (void *cls,
return;
}
}
+
/* stop immediately if we are done */
if (0 == TALER_amount_cmp (ctx->refund,
¤t_refund))
@@ -2736,7 +2738,7 @@ process_deposits_for_refund_cb (void *cls,
}
/**
- * We end up here if nto all of the refund has been covered.
+ * We end up here if not all of the refund has been covered.
* Although this should be checked as the business should never
* issue a refund bigger than the contract's actual price, we cannot
* rely upon the frontend being correct.
@@ -2744,6 +2746,7 @@ process_deposits_for_refund_cb (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"The refund of %s is bigger than the order's value\n",
TALER_amount2s (ctx->refund));
+
ctx->qs = GNUNET_DB_STATUS_HARD_ERROR;
}
--
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: 5732.,
gnunet <=