aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_batch_deposit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/exchange_api_batch_deposit.c')
-rw-r--r--src/lib/exchange_api_batch_deposit.c11
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 c583d5add..544407a38 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;