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_admin.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/exchange-lib/exchange_api_admin.c') diff --git a/src/exchange-lib/exchange_api_admin.c b/src/exchange-lib/exchange_api_admin.c index 3dcbb80e9..4ed761fb2 100644 --- a/src/exchange-lib/exchange_api_admin.c +++ b/src/exchange-lib/exchange_api_admin.c @@ -24,6 +24,8 @@ #include #include /* just for HTTP status codes */ #include +#include +#include "taler_json_lib.h" #include "taler_exchange_service.h" #include "exchange_api_json.h" #include "exchange_api_context.h" @@ -174,7 +176,7 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, CURL *eh; GNUNET_assert (GNUNET_OK == - TALER_round_abs_time (&execution_date)); + GNUNET_TIME_round_abs (&execution_date)); if (GNUNET_YES != MAH_handle_is_ready (exchange)) { @@ -183,10 +185,10 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange, } admin_obj = json_pack ("{s:o, s:o," /* reserve_pub/amount */ " s:o, s:O}", /* execution_Date/wire */ - "reserve_pub", TALER_json_from_data (reserve_pub, + "reserve_pub", GNUNET_JSON_from_data (reserve_pub, sizeof (*reserve_pub)), - "amount", TALER_json_from_amount (amount), - "execution_date", TALER_json_from_abs (execution_date), + "amount", TALER_JSON_from_amount (amount), + "execution_date", GNUNET_JSON_from_time_abs (execution_date), "wire", wire); aai = GNUNET_new (struct TALER_EXCHANGE_AdminAddIncomingHandle); aai->exchange = exchange; -- cgit v1.2.3