From 0d1eced630f4ed05ad95fdbb4354fd428c9cdbf6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Mar 2016 15:23:11 +0100 Subject: first refactoring of JSON logic to address #4150 and #4237 --- src/exchange-lib/exchange_api_deposit_wtid.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/exchange-lib/exchange_api_deposit_wtid.c') diff --git a/src/exchange-lib/exchange_api_deposit_wtid.c b/src/exchange-lib/exchange_api_deposit_wtid.c index 83beb03ae..f3b5d2c0d 100644 --- a/src/exchange-lib/exchange_api_deposit_wtid.c +++ b/src/exchange-lib/exchange_api_deposit_wtid.c @@ -24,6 +24,7 @@ #include #include /* just for HTTP status codes */ #include +#include #include "taler_exchange_service.h" #include "exchange_api_common.h" #include "exchange_api_json.h" @@ -296,16 +297,16 @@ TALER_EXCHANGE_deposit_wtid (struct TALER_EXCHANGE_Handle *exchange, deposit_wtid_obj = json_pack ("{s:o, s:o," /* H_wire, H_contract */ " s:o, s:I," /* coin_pub, transaction_id */ " s:o, s:o}", /* merchant_pub, merchant_sig */ - "H_wire", TALER_json_from_data (h_wire, + "H_wire", GNUNET_JSON_from_data (h_wire, sizeof (struct GNUNET_HashCode)), - "H_contract", TALER_json_from_data (h_contract, + "H_contract", GNUNET_JSON_from_data (h_contract, sizeof (struct GNUNET_HashCode)), - "coin_pub", TALER_json_from_data (coin_pub, + "coin_pub", GNUNET_JSON_from_data (coin_pub, sizeof (*coin_pub)), "transaction_id", (json_int_t) transaction_id, - "merchant_pub", TALER_json_from_data (&dtp.merchant, + "merchant_pub", GNUNET_JSON_from_data (&dtp.merchant, sizeof (struct TALER_MerchantPublicKeyP)), - "merchant_sig", TALER_json_from_data (&merchant_sig, + "merchant_sig", GNUNET_JSON_from_data (&merchant_sig, sizeof (merchant_sig))); dwh = GNUNET_new (struct TALER_EXCHANGE_DepositWtidHandle); -- cgit v1.2.3