diff options
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 |
commit | 98b51edf496cdc14974690c9809f665f14858977 (patch) | |
tree | eb48f666852c8df8b940d001bc0b0ef644df4a55 /src/exchange/taler-exchange-httpd_csr.c | |
parent | fb5bc18c588832747dfe299f9df1beb6645cf686 (diff) | |
parent | 8cc1edfe0aa77d3091f19aa87d06bb45c74b0128 (diff) |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/exchange/taler-exchange-httpd_csr.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_csr.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_csr.c b/src/exchange/taler-exchange-httpd_csr.c index 29f83c2c..3ceb319c 100644 --- a/src/exchange/taler-exchange-httpd_csr.c +++ b/src/exchange/taler-exchange-httpd_csr.c @@ -39,12 +39,12 @@ TEH_handler_csr_melt (struct TEH_RequestContext *rc, { struct TALER_RefreshMasterSecretP rms; unsigned int csr_requests_num; - json_t *csr_requests; + const json_t *csr_requests; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("rms", &rms), - GNUNET_JSON_spec_json ("nks", - &csr_requests), + GNUNET_JSON_spec_array_const ("nks", + &csr_requests), GNUNET_JSON_spec_end () }; enum TALER_ErrorCode ec; @@ -65,7 +65,7 @@ TEH_handler_csr_melt (struct TEH_RequestContext *rc, if ( (TALER_MAX_FRESH_COINS <= csr_requests_num) || (0 == csr_requests_num) ) { - GNUNET_JSON_parse_free (spec); + GNUNET_break_op (0); return TALER_MHD_reply_with_error ( rc->connection, MHD_HTTP_BAD_REQUEST, @@ -101,14 +101,12 @@ TEH_handler_csr_melt (struct TEH_RequestContext *rc, -1); if (GNUNET_OK != res) { - GNUNET_JSON_parse_free (spec); return (GNUNET_NO == res) ? MHD_YES : MHD_NO; } TALER_cs_refresh_nonce_derive (&rms, coin_off, &nonces[i]); } - GNUNET_JSON_parse_free (spec); for (unsigned int i = 0; i < csr_requests_num; i++) { |