aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-15 22:28:13 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-15 22:28:13 +0100
commit7993c9b2fd37d64a1846a4fe963dd94e581ac92d (patch)
tree16e487254c7a75fd3fe1c78cf6cf0160374cebb1
parentefdc91ead4a74afb9b858ea3377bbf5581aabb0d (diff)
clean up /wire logic
-rw-r--r--src/exchange/taler-exchange-httpd_wire.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_wire.c b/src/exchange/taler-exchange-httpd_wire.c
index c5d414025..7534e835a 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);