check json_pack return value, just to be nice
This commit is contained in:
parent
76545519c6
commit
0e73c0d451
@ -187,6 +187,11 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"execution_date", GNUNET_JSON_from_time_abs (execution_date),
|
"execution_date", GNUNET_JSON_from_time_abs (execution_date),
|
||||||
"sender_account_details", sender_account_details,
|
"sender_account_details", sender_account_details,
|
||||||
"transfer_details", transfer_details);
|
"transfer_details", transfer_details);
|
||||||
|
if (NULL == admin_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
aai = GNUNET_new (struct TALER_EXCHANGE_AdminAddIncomingHandle);
|
aai = GNUNET_new (struct TALER_EXCHANGE_AdminAddIncomingHandle);
|
||||||
aai->exchange = exchange;
|
aai->exchange = exchange;
|
||||||
aai->cb = res_cb;
|
aai->cb = res_cb;
|
||||||
|
@ -463,6 +463,11 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"wire_transfer_deadline", GNUNET_JSON_from_time_abs (wire_deadline),
|
"wire_transfer_deadline", GNUNET_JSON_from_time_abs (wire_deadline),
|
||||||
"coin_sig", GNUNET_JSON_from_data_auto (coin_sig)
|
"coin_sig", GNUNET_JSON_from_data_auto (coin_sig)
|
||||||
);
|
);
|
||||||
|
if (NULL == deposit_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
dh = GNUNET_new (struct TALER_EXCHANGE_DepositHandle);
|
dh = GNUNET_new (struct TALER_EXCHANGE_DepositHandle);
|
||||||
dh->exchange = exchange;
|
dh->exchange = exchange;
|
||||||
|
@ -306,7 +306,11 @@ TALER_EXCHANGE_payback (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"coin_sig", GNUNET_JSON_from_data_auto (&coin_sig),
|
"coin_sig", GNUNET_JSON_from_data_auto (&coin_sig),
|
||||||
"coin_blind_key_secret", GNUNET_JSON_from_data_auto (blinding_key)
|
"coin_blind_key_secret", GNUNET_JSON_from_data_auto (blinding_key)
|
||||||
);
|
);
|
||||||
GNUNET_assert (NULL != payback_obj);
|
if (NULL == payback_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ph = GNUNET_new (struct TALER_EXCHANGE_PaybackHandle);
|
ph = GNUNET_new (struct TALER_EXCHANGE_PaybackHandle);
|
||||||
ph->coin_pub = pr.coin_pub;
|
ph->coin_pub = pr.coin_pub;
|
||||||
|
@ -1337,6 +1337,11 @@ TALER_EXCHANGE_refresh_melt (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"melt_coin", melt_coin,
|
"melt_coin", melt_coin,
|
||||||
"coin_evs", coin_evs,
|
"coin_evs", coin_evs,
|
||||||
"transfer_pubs", transfer_pubs);
|
"transfer_pubs", transfer_pubs);
|
||||||
|
if (NULL == melt_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* and now we can at last begin the actual request handling */
|
/* and now we can at last begin the actual request handling */
|
||||||
rmh = GNUNET_new (struct TALER_EXCHANGE_RefreshMeltHandle);
|
rmh = GNUNET_new (struct TALER_EXCHANGE_RefreshMeltHandle);
|
||||||
@ -1723,6 +1728,11 @@ TALER_EXCHANGE_refresh_reveal (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
GNUNET_JSON_from_data_auto (&md->melt_session_hash),
|
GNUNET_JSON_from_data_auto (&md->melt_session_hash),
|
||||||
"transfer_privs",
|
"transfer_privs",
|
||||||
transfer_privs);
|
transfer_privs);
|
||||||
|
if (NULL == reveal_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* finally, we can actually issue the request */
|
/* finally, we can actually issue the request */
|
||||||
rrh = GNUNET_new (struct TALER_EXCHANGE_RefreshRevealHandle);
|
rrh = GNUNET_new (struct TALER_EXCHANGE_RefreshRevealHandle);
|
||||||
|
@ -279,7 +279,11 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"merchant_pub", GNUNET_JSON_from_data_auto (&rr.merchant),
|
"merchant_pub", GNUNET_JSON_from_data_auto (&rr.merchant),
|
||||||
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig)
|
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig)
|
||||||
);
|
);
|
||||||
GNUNET_assert (NULL != refund_obj);
|
if (NULL == refund_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
rh = GNUNET_new (struct TALER_EXCHANGE_RefundHandle);
|
rh = GNUNET_new (struct TALER_EXCHANGE_RefundHandle);
|
||||||
rh->exchange = exchange;
|
rh->exchange = exchange;
|
||||||
|
@ -1015,6 +1015,12 @@ TALER_EXCHANGE_reserve_withdraw (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"reserve_pub", GNUNET_JSON_from_data_auto (&wsh->reserve_pub),
|
"reserve_pub", GNUNET_JSON_from_data_auto (&wsh->reserve_pub),
|
||||||
"reserve_sig", GNUNET_JSON_from_data_auto (&reserve_sig));
|
"reserve_sig", GNUNET_JSON_from_data_auto (&reserve_sig));
|
||||||
GNUNET_free (coin_ev);
|
GNUNET_free (coin_ev);
|
||||||
|
if (NULL == withdraw_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
wsh->blinding_key = *blinding_key;
|
wsh->blinding_key = *blinding_key;
|
||||||
wsh->url = MAH_path_to_url (exchange, "/reserve/withdraw");
|
wsh->url = MAH_path_to_url (exchange, "/reserve/withdraw");
|
||||||
|
@ -303,6 +303,11 @@ TALER_EXCHANGE_track_transaction (struct TALER_EXCHANGE_Handle *exchange,
|
|||||||
"coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
|
"coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
|
||||||
"merchant_pub", GNUNET_JSON_from_data_auto (&dtp.merchant),
|
"merchant_pub", GNUNET_JSON_from_data_auto (&dtp.merchant),
|
||||||
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig));
|
"merchant_sig", GNUNET_JSON_from_data_auto (&merchant_sig));
|
||||||
|
if (NULL == deposit_wtid_obj)
|
||||||
|
{
|
||||||
|
GNUNET_break (0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
dwh = GNUNET_new (struct TALER_EXCHANGE_TrackTransactionHandle);
|
dwh = GNUNET_new (struct TALER_EXCHANGE_TrackTransactionHandle);
|
||||||
dwh->exchange = exchange;
|
dwh->exchange = exchange;
|
||||||
|
Loading…
Reference in New Issue
Block a user