diff options
Diffstat (limited to 'src/testing/testing_api_cmd_patch_product.c')
-rw-r--r-- | src/testing/testing_api_cmd_patch_product.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/testing/testing_api_cmd_patch_product.c b/src/testing/testing_api_cmd_patch_product.c index 7e4476d8..6e4613df 100644 --- a/src/testing/testing_api_cmd_patch_product.c +++ b/src/testing/testing_api_cmd_patch_product.c @@ -77,7 +77,7 @@ struct PatchProductState /** * base64-encoded product image */ - json_t *image; + char *image; /** * list of taxes paid by the merchant @@ -205,7 +205,7 @@ patch_product_traits (void *cls, TALER_TESTING_make_trait_json (0, pps->description_i18n), TALER_TESTING_make_trait_string (1, pps->unit), TALER_TESTING_make_trait_amount_obj (0, &pps->price), - TALER_TESTING_make_trait_json (1, pps->image), + TALER_TESTING_make_trait_string (3, pps->image), TALER_TESTING_make_trait_json (2, pps->taxes), TALER_TESTING_make_trait_int64 (0, &pps->total_stock), TALER_TESTING_make_trait_json (3, pps->address), @@ -241,7 +241,7 @@ patch_product_cleanup (void *cls, TALER_MERCHANT_product_patch_cancel (pis->iph); } json_decref (pis->description_i18n); - json_decref (pis->image); + GNUNET_free (pis->image); json_decref (pis->taxes); json_decref (pis->address); GNUNET_free (pis); @@ -257,7 +257,7 @@ TALER_TESTING_cmd_merchant_patch_product ( json_t *description_i18n, const char *unit, const char *price, - json_t *image, + const char *image, json_t *taxes, int64_t total_stock, uint64_t total_lost, @@ -277,7 +277,7 @@ TALER_TESTING_cmd_merchant_patch_product ( GNUNET_assert (GNUNET_OK == TALER_string_to_amount (price, &pis->price)); - pis->image = image; /* ownership taken */ + pis->image = GNUNET_strdup (image); pis->taxes = taxes; /* ownership taken */ pis->total_stock = total_stock; pis->total_lost = total_lost; |