[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 01/02: clean up /wire logic
From: |
gnunet |
Subject: |
[taler-exchange] 01/02: clean up /wire logic |
Date: |
Sun, 15 Mar 2020 22:36:55 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit 7993c9b2fd37d64a1846a4fe963dd94e581ac92d
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Mar 15 22:28:13 2020 +0100
clean up /wire logic
---
src/exchange/taler-exchange-httpd_wire.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_wire.c
b/src/exchange/taler-exchange-httpd_wire.c
index c5d41402..7534e835 100644
--- a/src/exchange/taler-exchange-httpd_wire.c
+++ b/src/exchange/taler-exchange-httpd_wire.c
@@ -47,11 +47,17 @@ fees_to_json (struct TALER_EXCHANGEDB_AggregateFees *af)
json_t *a;
a = json_array ();
+ if (NULL == a)
+ {
+ GNUNET_break (0); /* out of memory? */
+ return NULL;
+ }
while (NULL != af)
{
if ( (GNUNET_NO == GNUNET_TIME_round_abs (&af->start_date)) ||
(GNUNET_NO == GNUNET_TIME_round_abs (&af->end_date)) )
{
+ GNUNET_break (0); /* bad timestamps, should not happen */
json_decref (a);
return NULL;
}
@@ -72,7 +78,7 @@ fees_to_json (struct TALER_EXCHANGEDB_AggregateFees *af)
"sig", GNUNET_JSON_from_data_auto (
&af->master_sig))))
{
- GNUNET_break (0);
+ GNUNET_break (0); /* out of memory? */
json_decref (a);
return NULL;
}
@@ -109,8 +115,9 @@ TEH_WIRE_get_fees (const char *method)
if (NULL == af)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to find current wire transfer fees for `%s'\n",
- method);
+ "Failed to find current wire transfer fees for `%s' at time
%s\n",
+ method,
+ GNUNET_STRINGS_absolute_time_to_string (now));
return NULL;
}
j = fees_to_json (af);
--
To stop receiving notification emails like this one, please contact
address@hidden.