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/lib/exchange_api_batch_deposit.c | |
parent | fb5bc18c588832747dfe299f9df1beb6645cf686 (diff) | |
parent | 8cc1edfe0aa77d3091f19aa87d06bb45c74b0128 (diff) |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/lib/exchange_api_batch_deposit.c')
-rw-r--r-- | src/lib/exchange_api_batch_deposit.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/exchange_api_batch_deposit.c b/src/lib/exchange_api_batch_deposit.c index c583d5ad..544407a3 100644 --- a/src/lib/exchange_api_batch_deposit.c +++ b/src/lib/exchange_api_batch_deposit.c @@ -237,12 +237,12 @@ handle_deposit_finished (void *cls, case MHD_HTTP_OK: { const struct TALER_EXCHANGE_Keys *key_state; - json_t *sigs; + const json_t *sigs; json_t *sig; unsigned int idx; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_json ("exchange_sigs", - &sigs), + GNUNET_JSON_spec_array_const ("exchange_sigs", + &sigs), GNUNET_JSON_spec_fixed_auto ("exchange_pub", &dh->exchange_pub), GNUNET_JSON_spec_mark_optional ( @@ -269,7 +269,6 @@ handle_deposit_finished (void *cls, GNUNET_break_op (0); dr.hr.http_status = 0; dr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; - GNUNET_JSON_parse_free (spec); break; } dh->exchange_sigs = GNUNET_new_array (dh->num_cdds, @@ -282,7 +281,6 @@ handle_deposit_finished (void *cls, GNUNET_break_op (0); dr.hr.http_status = 0; dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE; - GNUNET_JSON_parse_free (spec); break; } json_array_foreach (sigs, idx, sig) @@ -303,7 +301,6 @@ handle_deposit_finished (void *cls, GNUNET_break_op (0); dr.hr.http_status = 0; dr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; - GNUNET_JSON_parse_free (spec); break; } dki = TALER_EXCHANGE_get_denomination_key_by_hash (key_state, @@ -332,14 +329,12 @@ handle_deposit_finished (void *cls, GNUNET_break_op (0); dr.hr.http_status = 0; dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE; - GNUNET_JSON_parse_free (spec); break; } } TEAH_get_auditors_for_dc (dh->exchange, &auditor_cb, dh); - GNUNET_JSON_parse_free (spec); } dr.details.ok.exchange_sigs = dh->exchange_sigs; dr.details.ok.exchange_pub = &dh->exchange_pub; |