aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_reserves_open.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-06-05 09:18:35 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-06-05 09:18:35 +0200
commit98b51edf496cdc14974690c9809f665f14858977 (patch)
treeeb48f666852c8df8b940d001bc0b0ef644df4a55 /src/exchange/taler-exchange-httpd_reserves_open.c
parentfb5bc18c588832747dfe299f9df1beb6645cf686 (diff)
parent8cc1edfe0aa77d3091f19aa87d06bb45c74b0128 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/exchange/taler-exchange-httpd_reserves_open.c')
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_open.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd_reserves_open.c b/src/exchange/taler-exchange-httpd_reserves_open.c
index 6909c862..50487990 100644
--- a/src/exchange/taler-exchange-httpd_reserves_open.c
+++ b/src/exchange/taler-exchange-httpd_reserves_open.c
@@ -303,7 +303,7 @@ TEH_handler_reserves_open (struct TEH_RequestContext *rc,
const json_t *root)
{
struct ReserveOpenContext rsc;
- json_t *payments;
+ const json_t *payments;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_timestamp ("request_timestamp",
&rsc.timestamp),
@@ -313,8 +313,8 @@ TEH_handler_reserves_open (struct TEH_RequestContext *rc,
&rsc.reserve_sig),
GNUNET_JSON_spec_uint32 ("purse_limit",
&rsc.purse_limit),
- GNUNET_JSON_spec_json ("payments",
- &payments),
+ GNUNET_JSON_spec_array_const ("payments",
+ &payments),
TALER_JSON_spec_amount ("reserve_payment",
TEH_currency,
&rsc.reserve_payment),
@@ -403,7 +403,6 @@ TEH_handler_reserves_open (struct TEH_RequestContext *rc,
if (NULL == keys)
{
GNUNET_break (0);
- GNUNET_JSON_parse_free (spec);
cleanup_rsc (&rsc);
return TALER_MHD_reply_with_error (rc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,