aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/exchange_api_deposit.c15
-rw-r--r--src/exchange-lib/exchange_api_handle.c11
-rw-r--r--src/exchange-lib/exchange_api_payback.c19
-rw-r--r--src/exchange-lib/exchange_api_refresh.c34
-rw-r--r--src/exchange-lib/exchange_api_refresh_link.c13
-rw-r--r--src/exchange-lib/exchange_api_refund.c13
-rw-r--r--src/exchange-lib/exchange_api_reserve.c32
-rw-r--r--src/exchange-lib/exchange_api_track_transaction.c17
-rw-r--r--src/exchange-lib/exchange_api_track_transfer.c13
-rw-r--r--src/exchange-lib/exchange_api_wire.c11
10 files changed, 95 insertions, 83 deletions
diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c
index 71a1f2d68..c388e6816 100644
--- a/src/exchange-lib/exchange_api_deposit.c
+++ b/src/exchange-lib/exchange_api_deposit.c
@@ -193,16 +193,17 @@ verify_deposit_signature_forbidden (const struct TALER_EXCHANGE_DepositHandle *d
*
* @param cls the `struct TALER_EXCHANGE_DepositHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_deposit_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_DepositHandle *dh = cls;
struct TALER_ExchangePublicKeyP exchange_pub;
struct TALER_ExchangePublicKeyP *ep = NULL;
+ const json_t *j = response;
dh->job = NULL;
switch (response_code)
@@ -212,7 +213,7 @@ handle_deposit_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
verify_deposit_signature_ok (dh,
- json,
+ j,
&exchange_pub))
{
GNUNET_break_op (0);
@@ -231,7 +232,7 @@ handle_deposit_finished (void *cls,
/* Double spending; check signatures on transaction history */
if (GNUNET_OK !=
verify_deposit_signature_forbidden (dh,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -261,9 +262,9 @@ handle_deposit_finished (void *cls,
}
dh->cb (dh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
ep,
- json);
+ j);
TALER_EXCHANGE_deposit_cancel (dh);
}
@@ -511,7 +512,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
dh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_deposit_finished,
+ &handle_deposit_finished,
dh);
return dh;
}
diff --git a/src/exchange-lib/exchange_api_handle.c b/src/exchange-lib/exchange_api_handle.c
index eb81a79fa..27ee257d9 100644
--- a/src/exchange-lib/exchange_api_handle.c
+++ b/src/exchange-lib/exchange_api_handle.c
@@ -834,13 +834,14 @@ TALER_EXCHANGE_check_keys_current (struct TALER_EXCHANGE_Handle *exchange,
static void
keys_completed_cb (void *cls,
long response_code,
- const json_t *resp_obj)
+ const void *resp_obj)
{
struct KeysRequest *kr = cls;
struct TALER_EXCHANGE_Handle *exchange = kr->exchange;
struct TALER_EXCHANGE_Keys kd;
struct TALER_EXCHANGE_Keys kd_old;
enum TALER_EXCHANGE_VersionCompatibility vc;
+ const json_t *j = resp_obj;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received keys from URL `%s' with status %ld.\n",
@@ -863,7 +864,7 @@ keys_completed_cb (void *cls,
exchange);
return;
case MHD_HTTP_OK:
- if (NULL == resp_obj)
+ if (NULL == j)
{
response_code = 0;
break;
@@ -902,7 +903,7 @@ keys_completed_cb (void *cls,
}
if (GNUNET_OK !=
- decode_keys_json (resp_obj,
+ decode_keys_json (j,
GNUNET_YES,
&kd,
&vc))
@@ -927,7 +928,7 @@ keys_completed_cb (void *cls,
break;
}
json_decref (exchange->key_data_raw);
- exchange->key_data_raw = json_deep_copy (resp_obj);
+ exchange->key_data_raw = json_deep_copy (j);
exchange->retry_delay = GNUNET_TIME_UNIT_ZERO;
break;
default:
@@ -1484,7 +1485,7 @@ request_keys (void *cls)
kr->job = GNUNET_CURL_job_add (exchange->ctx,
eh,
GNUNET_NO,
- (GC_JCC) &keys_completed_cb,
+ &keys_completed_cb,
kr);
exchange->kr = kr;
}
diff --git a/src/exchange-lib/exchange_api_payback.c b/src/exchange-lib/exchange_api_payback.c
index 79eb55838..5bfed2cfe 100644
--- a/src/exchange-lib/exchange_api_payback.c
+++ b/src/exchange-lib/exchange_api_payback.c
@@ -158,14 +158,15 @@ verify_payback_signature_ok (const struct TALER_EXCHANGE_PaybackHandle *ph,
*
* @param cls the `struct TALER_EXCHANGE_PaybackHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_payback_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_PaybackHandle *ph = cls;
+ const json_t *j = response;
ph->job = NULL;
switch (response_code)
@@ -175,7 +176,7 @@ handle_payback_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
verify_payback_signature_ok (ph,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -194,7 +195,7 @@ handle_payback_finished (void *cls,
const struct TALER_EXCHANGE_DenomPublicKey *dki;
dki = ph->pk;
- history = json_object_get (json,
+ history = json_object_get (j,
"history");
if (GNUNET_OK !=
TALER_EXCHANGE_verify_coin_history (dki->fee_deposit.currency,
@@ -207,11 +208,11 @@ handle_payback_finished (void *cls,
}
ph->cb (ph->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
&total,
GNUNET_TIME_UNIT_FOREVER_ABS,
NULL,
- json);
+ j);
TALER_EXCHANGE_payback_cancel (ph);
return;
}
@@ -243,11 +244,11 @@ handle_payback_finished (void *cls,
}
ph->cb (ph->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
NULL,
GNUNET_TIME_UNIT_FOREVER_ABS,
NULL,
- json);
+ j);
TALER_EXCHANGE_payback_cancel (ph);
}
@@ -344,7 +345,7 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange,
ph->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_payback_finished,
+ &handle_payback_finished,
ph);
return ph;
}
diff --git a/src/exchange-lib/exchange_api_refresh.c b/src/exchange-lib/exchange_api_refresh.c
index 035d9d6da..443ba7d23 100644
--- a/src/exchange-lib/exchange_api_refresh.c
+++ b/src/exchange-lib/exchange_api_refresh.c
@@ -1032,16 +1032,17 @@ verify_refresh_melt_signature_forbidden (struct TALER_EXCHANGE_RefreshMeltHandle
*
* @param cls the `struct TALER_EXCHANGE_RefreshMeltHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_refresh_melt_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_RefreshMeltHandle *rmh = cls;
uint32_t noreveal_index = TALER_CNC_KAPPA; /* invalid value */
struct TALER_ExchangePublicKeyP exchange_pub;
+ const json_t *j = response;
rmh->job = NULL;
switch (response_code)
@@ -1051,7 +1052,7 @@ handle_refresh_melt_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
verify_refresh_melt_signature_ok (rmh,
- json,
+ j,
&exchange_pub,
&noreveal_index))
{
@@ -1062,10 +1063,10 @@ handle_refresh_melt_finished (void *cls,
{
rmh->melt_cb (rmh->melt_cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
noreveal_index,
(0 == response_code) ? NULL : &exchange_pub,
- json);
+ j);
rmh->melt_cb = NULL;
}
break;
@@ -1077,7 +1078,7 @@ handle_refresh_melt_finished (void *cls,
/* Double spending; check signatures on transaction history */
if (GNUNET_OK !=
verify_refresh_melt_signature_forbidden (rmh,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -1108,10 +1109,10 @@ handle_refresh_melt_finished (void *cls,
if (NULL != rmh->melt_cb)
rmh->melt_cb (rmh->melt_cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
UINT32_MAX,
NULL,
- json);
+ j);
TALER_EXCHANGE_refresh_melt_cancel (rmh);
}
@@ -1218,7 +1219,7 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
rmh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_refresh_melt_finished,
+ &handle_refresh_melt_finished,
rmh);
return rmh;
}
@@ -1411,14 +1412,15 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshRevealHandle *rrh,
*
* @param cls the `struct TALER_EXCHANGE_RefreshHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_refresh_reveal_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_RefreshRevealHandle *rrh = cls;
+ const json_t *j = response;
rrh->job = NULL;
switch (response_code)
@@ -1433,7 +1435,7 @@ handle_refresh_reveal_finished (void *cls,
memset (sigs, 0, sizeof (sigs));
ret = refresh_reveal_ok (rrh,
- json,
+ j,
coin_privs,
sigs);
if (GNUNET_OK != ret)
@@ -1448,7 +1450,7 @@ handle_refresh_reveal_finished (void *cls,
rrh->md->num_fresh_coins,
coin_privs,
sigs,
- json);
+ j);
rrh->reveal_cb = NULL;
}
for (unsigned int i=0;i<rrh->md->num_fresh_coins;i++)
@@ -1481,11 +1483,11 @@ handle_refresh_reveal_finished (void *cls,
if (NULL != rrh->reveal_cb)
rrh->reveal_cb (rrh->reveal_cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
0,
NULL,
NULL,
- json);
+ j);
TALER_EXCHANGE_refresh_reveal_cancel (rrh);
}
@@ -1645,7 +1647,7 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
rrh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_refresh_reveal_finished,
+ &handle_refresh_reveal_finished,
rrh);
return rrh;
}
diff --git a/src/exchange-lib/exchange_api_refresh_link.c b/src/exchange-lib/exchange_api_refresh_link.c
index f882491ea..545c96a7c 100644
--- a/src/exchange-lib/exchange_api_refresh_link.c
+++ b/src/exchange-lib/exchange_api_refresh_link.c
@@ -301,14 +301,15 @@ parse_refresh_link_ok (struct TALER_EXCHANGE_RefreshLinkHandle *rlh,
*
* @param cls the `struct TALER_EXCHANGE_RefreshLinkHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_refresh_link_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_RefreshLinkHandle *rlh = cls;
+ const json_t *j = response;
rlh->job = NULL;
switch (response_code)
@@ -318,7 +319,7 @@ handle_refresh_link_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
parse_refresh_link_ok (rlh,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -348,12 +349,12 @@ handle_refresh_link_finished (void *cls,
if (NULL != rlh->link_cb)
rlh->link_cb (rlh->link_cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
0,
NULL,
NULL,
NULL,
- json);
+ j);
TALER_EXCHANGE_refresh_link_cancel (rlh);
}
@@ -415,7 +416,7 @@ TALER_EXCHANGE_refresh_link (struct TALER_EXCHANGE_Handle *exchange,
rlh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_refresh_link_finished,
+ &handle_refresh_link_finished,
rlh);
return rlh;
}
diff --git a/src/exchange-lib/exchange_api_refund.c b/src/exchange-lib/exchange_api_refund.c
index 80eed74dc..1f1e66942 100644
--- a/src/exchange-lib/exchange_api_refund.c
+++ b/src/exchange-lib/exchange_api_refund.c
@@ -133,16 +133,17 @@ verify_refund_signature_ok (const struct TALER_EXCHANGE_RefundHandle *rh,
*
* @param cls the `struct TALER_EXCHANGE_RefundHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_refund_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_RefundHandle *rh = cls;
struct TALER_ExchangePublicKeyP exchange_pub;
struct TALER_ExchangePublicKeyP *ep = NULL;
+ const json_t *j = response;
rh->job = NULL;
switch (response_code)
@@ -152,7 +153,7 @@ handle_refund_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
verify_refund_signature_ok (rh,
- json,
+ j,
&exchange_pub))
{
GNUNET_break_op (0);
@@ -203,9 +204,9 @@ handle_refund_finished (void *cls,
}
rh->cb (rh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
ep,
- json);
+ j);
TALER_EXCHANGE_refund_cancel (rh);
}
@@ -386,7 +387,7 @@ refund_obj = json_pack ("{s:o, s:o," /* amount/fee */
rh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_refund_finished,
+ &handle_refund_finished,
rh);
return rh;
}
diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c
index 1f9a3a36e..99e7588c0 100644
--- a/src/exchange-lib/exchange_api_reserve.c
+++ b/src/exchange-lib/exchange_api_reserve.c
@@ -456,14 +456,15 @@ free_rhistory (struct TALER_EXCHANGE_ReserveHistory *rhistory,
*
* @param cls the `struct TALER_EXCHANGE_ReserveStatusHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_reserve_status_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_ReserveStatusHandle *rsh = cls;
+ const json_t *j = response;
rsh->job = NULL;
switch (response_code)
@@ -483,7 +484,7 @@ handle_reserve_status_finished (void *cls,
};
if (GNUNET_OK !=
- GNUNET_JSON_parse (json,
+ GNUNET_JSON_parse (j,
spec,
NULL,
NULL))
@@ -492,7 +493,7 @@ handle_reserve_status_finished (void *cls,
response_code = 0;
break;
}
- history = json_object_get (json,
+ history = json_object_get (j,
"history");
if (NULL == history)
{
@@ -531,7 +532,7 @@ handle_reserve_status_finished (void *cls,
rsh->cb (rsh->cb_cls,
response_code,
TALER_EC_NONE,
- json,
+ j,
&balance,
len,
rhistory);
@@ -567,8 +568,8 @@ handle_reserve_status_finished (void *cls,
{
rsh->cb (rsh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
- json,
+ TALER_JSON_get_error_code (j),
+ j,
NULL,
0, NULL);
rsh->cb = NULL;
@@ -631,7 +632,7 @@ TALER_EXCHANGE_reserve_status (struct TALER_EXCHANGE_Handle *exchange,
rsh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_NO,
- (GC_JCC) &handle_reserve_status_finished,
+ &handle_reserve_status_finished,
rsh);
return rsh;
}
@@ -891,14 +892,15 @@ reserve_withdraw_payment_required (struct TALER_EXCHANGE_ReserveWithdrawHandle *
*
* @param cls the `struct TALER_EXCHANGE_ReserveWithdrawHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_reserve_withdraw_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_ReserveWithdrawHandle *wsh = cls;
+ const json_t *j = response;
wsh->job = NULL;
switch (response_code)
@@ -908,7 +910,7 @@ handle_reserve_withdraw_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK !=
reserve_withdraw_ok (wsh,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -923,7 +925,7 @@ handle_reserve_withdraw_finished (void *cls,
check the signatures in the history... */
if (GNUNET_OK !=
reserve_withdraw_payment_required (wsh,
- json))
+ j))
{
GNUNET_break_op (0);
response_code = 0;
@@ -958,9 +960,9 @@ handle_reserve_withdraw_finished (void *cls,
{
wsh->cb (wsh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
NULL,
- json);
+ j);
wsh->cb = NULL;
}
TALER_EXCHANGE_reserve_withdraw_cancel (wsh);
@@ -1039,7 +1041,7 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange,
wsh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_reserve_withdraw_finished,
+ &handle_reserve_withdraw_finished,
wsh);
return wsh;
}
diff --git a/src/exchange-lib/exchange_api_track_transaction.c b/src/exchange-lib/exchange_api_track_transaction.c
index 9027acf52..0d9f97ee4 100644
--- a/src/exchange-lib/exchange_api_track_transaction.c
+++ b/src/exchange-lib/exchange_api_track_transaction.c
@@ -134,12 +134,12 @@ verify_deposit_wtid_signature_ok (const struct TALER_EXCHANGE_TrackTransactionHa
*
* @param cls the `struct TALER_EXCHANGE_TrackTransactionHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_deposit_wtid_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_TrackTransactionHandle *dwh = cls;
const struct TALER_WireTransferIdentifierRawP *wtid = NULL;
@@ -148,6 +148,7 @@ handle_deposit_wtid_finished (void *cls,
struct TALER_Amount coin_contribution_s;
struct TALER_ExchangePublicKeyP exchange_pub;
struct TALER_ExchangePublicKeyP *ep = NULL;
+ const json_t *j = response;
dwh->job = NULL;
switch (response_code)
@@ -164,7 +165,7 @@ handle_deposit_wtid_finished (void *cls,
};
if (GNUNET_OK !=
- GNUNET_JSON_parse (json,
+ GNUNET_JSON_parse (j,
spec,
NULL, NULL))
{
@@ -179,7 +180,7 @@ handle_deposit_wtid_finished (void *cls,
coin_contribution = &coin_contribution_s;
if (GNUNET_OK !=
verify_deposit_wtid_signature_ok (dwh,
- json,
+ j,
&exchange_pub))
{
GNUNET_break_op (0);
@@ -200,7 +201,7 @@ handle_deposit_wtid_finished (void *cls,
};
if (GNUNET_OK !=
- GNUNET_JSON_parse (json,
+ GNUNET_JSON_parse (j,
spec,
NULL, NULL))
{
@@ -238,9 +239,9 @@ handle_deposit_wtid_finished (void *cls,
}
dwh->cb (dwh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
ep,
- json,
+ j,
wtid,
execution_time,
coin_contribution);
@@ -337,7 +338,7 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
dwh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_deposit_wtid_finished,
+ &handle_deposit_wtid_finished,
dwh);
return dwh;
}
diff --git a/src/exchange-lib/exchange_api_track_transfer.c b/src/exchange-lib/exchange_api_track_transfer.c
index 5d46ffa5a..7d4c92f7c 100644
--- a/src/exchange-lib/exchange_api_track_transfer.c
+++ b/src/exchange-lib/exchange_api_track_transfer.c
@@ -248,14 +248,15 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
*
* @param cls the `struct TALER_EXCHANGE_TrackTransferHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_track_transfer_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_TrackTransferHandle *wdh = cls;
+ const json_t *j = response;
wdh->job = NULL;
switch (response_code)
@@ -265,7 +266,7 @@ handle_track_transfer_finished (void *cls,
case MHD_HTTP_OK:
if (GNUNET_OK ==
check_track_transfer_response_ok (wdh,
- json))
+ j))
return;
GNUNET_break_op (0);
response_code = 0;
@@ -298,9 +299,9 @@ handle_track_transfer_finished (void *cls,
}
wdh->cb (wdh->cb_cls,
response_code,
- TALER_JSON_get_error_code (json),
+ TALER_JSON_get_error_code (j),
NULL,
- json,
+ j,
NULL,
GNUNET_TIME_UNIT_ZERO_ABS,
NULL,
@@ -359,7 +360,7 @@ TALER_EXCHANGE_track_transfer (struct TALER_EXCHANGE_Handle *exchange,
wdh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_track_transfer_finished,
+ &handle_track_transfer_finished,
wdh);
return wdh;
}
diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c
index ef64a777b..894fd4944 100644
--- a/src/exchange-lib/exchange_api_wire.c
+++ b/src/exchange-lib/exchange_api_wire.c
@@ -202,15 +202,16 @@ lookup_fee (const struct FeeMap *fm,
*
* @param cls the `struct TALER_EXCHANGE_WireHandle`
* @param response_code HTTP response code, 0 on error
- * @param json parsed JSON result, NULL on error
+ * @param response parsed JSON result, NULL on error
*/
static void
handle_wire_finished (void *cls,
long response_code,
- const json_t *json)
+ const void *response)
{
struct TALER_EXCHANGE_WireHandle *wh = cls;
enum TALER_ErrorCode ec;
+ const json_t *j = response;
wh->job = NULL;
ec = TALER_EC_NONE;
@@ -232,7 +233,7 @@ handle_wire_finished (void *cls,
};
if (GNUNET_OK !=
- GNUNET_JSON_parse (json,
+ GNUNET_JSON_parse (j,
spec,
NULL, NULL))
{
@@ -359,7 +360,7 @@ handle_wire_finished (void *cls,
if (NULL != wh->cb)
wh->cb (wh->cb_cls,
response_code,
- (0 == response_code) ? ec : TALER_JSON_get_error_code (json),
+ (0 == response_code) ? ec : TALER_JSON_get_error_code (j),
0,
NULL);
TALER_EXCHANGE_wire_cancel (wh);
@@ -412,7 +413,7 @@ TALER_EXCHANGE_wire (struct TALER_EXCHANGE_Handle *exchange,
wh->job = GNUNET_CURL_job_add (ctx,
eh,
GNUNET_YES,
- (GC_JCC) &handle_wire_finished,
+ &handle_wire_finished,
wh);
return wh;
}