diff options
Diffstat (limited to 'src/lib/merchant_api_get_template.c')
-rw-r--r-- | src/lib/merchant_api_get_template.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/merchant_api_get_template.c b/src/lib/merchant_api_get_template.c index 386026cf..3e4a23a8 100644 --- a/src/lib/merchant_api_get_template.c +++ b/src/lib/merchant_api_get_template.c @@ -93,7 +93,7 @@ handle_get_template_finished (void *cls, case MHD_HTTP_OK: { uint32_t alg32; - json_t *contract; + const json_t *contract; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("template_description", &tgr.details.ok.template_description), @@ -103,8 +103,8 @@ handle_get_template_finished (void *cls, GNUNET_JSON_spec_string ("pos_key", &tgr.details.ok.pos_key), NULL), - GNUNET_JSON_spec_json ("template_contract", - &contract), + GNUNET_JSON_spec_object_const ("template_contract", + &contract), GNUNET_JSON_spec_end () }; @@ -118,13 +118,11 @@ handle_get_template_finished (void *cls, tgr.details.ok.template_contract = contract; tgh->cb (tgh->cb_cls, &tgr); - GNUNET_JSON_parse_free (spec); TALER_MERCHANT_template_get_cancel (tgh); return; } tgr.hr.http_status = 0; tgr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; - GNUNET_JSON_parse_free (spec); break; } case MHD_HTTP_UNAUTHORIZED: |