[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: check return value
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: check return value from taler_array_append_new() |
Date: |
Sun, 19 Mar 2017 11:13:02 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new b0ba819 check return value from taler_array_append_new()
b0ba819 is described below
commit b0ba819cf41a3a13a84516d4fc6574277ba2ec96
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Mar 19 11:12:56 2017 +0100
check return value from taler_array_append_new()
---
src/exchange/taler-exchange-httpd_wire.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_wire.c
b/src/exchange/taler-exchange-httpd_wire.c
index 26cbb18..2109395 100644
--- a/src/exchange/taler-exchange-httpd_wire.c
+++ b/src/exchange/taler-exchange-httpd_wire.c
@@ -54,12 +54,18 @@ fees_to_json (struct TALER_EXCHANGEDB_AggregateFees *af)
json_decref (a);
return NULL;
}
- json_array_append_new (a,
- json_pack ("{s:o, s:o, s:o, s:o}",
- "wire_fee", TALER_JSON_from_amount
(&af->wire_fee),
- "start_date", GNUNET_JSON_from_time_abs
(af->start_date),
- "end_date", GNUNET_JSON_from_time_abs
(af->end_date),
- "sig", GNUNET_JSON_from_data_auto
(&af->master_sig)));
+ if (0 !=
+ json_array_append_new (a,
+ json_pack ("{s:o, s:o, s:o, s:o}",
+ "wire_fee", TALER_JSON_from_amount
(&af->wire_fee),
+ "start_date",
GNUNET_JSON_from_time_abs (af->start_date),
+ "end_date",
GNUNET_JSON_from_time_abs (af->end_date),
+ "sig", GNUNET_JSON_from_data_auto
(&af->master_sig))))
+ {
+ GNUNET_break (0);
+ json_decref (a);
+ return NULL;
+ }
af = af->next;
}
return a;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: check return value from taler_array_append_new(),
gnunet <=