more API clean up

This commit is contained in:
Christian Grothoff 2023-07-03 18:39:06 +02:00
parent 290268e9af
commit d3772a834f
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
17 changed files with 85 additions and 76 deletions

View File

@ -961,10 +961,11 @@ struct TALER_EXCHANGE_WireAccount
* @return #GNUNET_OK if parsing @a accounts succeeded * @return #GNUNET_OK if parsing @a accounts succeeded
*/ */
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_EXCHANGE_parse_accounts (const struct TALER_MasterPublicKeyP *master_pub, TALER_EXCHANGE_parse_accounts (
const json_t *accounts, const struct TALER_MasterPublicKeyP *master_pub,
struct TALER_EXCHANGE_WireAccount was[], const json_t *accounts,
unsigned int was_length); unsigned int was_length,
struct TALER_EXCHANGE_WireAccount was[static was_length]);
/** /**
@ -974,8 +975,9 @@ TALER_EXCHANGE_parse_accounts (const struct TALER_MasterPublicKeyP *master_pub,
* @param was_len length of the @a was array * @param was_len length of the @a was array
*/ */
void void
TALER_EXCHANGE_free_accounts (struct TALER_EXCHANGE_WireAccount *was, TALER_EXCHANGE_free_accounts (
unsigned int was_len); unsigned int was_len,
struct TALER_EXCHANGE_WireAccount was[static was_len]);
/** /**
@ -1302,7 +1304,7 @@ TALER_EXCHANGE_batch_deposit (
struct TALER_EXCHANGE_Keys *keys, struct TALER_EXCHANGE_Keys *keys,
const struct TALER_EXCHANGE_DepositContractDetail *dcd, const struct TALER_EXCHANGE_DepositContractDetail *dcd,
unsigned int num_cdds, unsigned int num_cdds,
const struct TALER_EXCHANGE_CoinDepositDetail *cdds, const struct TALER_EXCHANGE_CoinDepositDetail cdds[static num_cdds],
TALER_EXCHANGE_BatchDepositResultCallback cb, TALER_EXCHANGE_BatchDepositResultCallback cb,
void *cb_cls, void *cb_cls,
enum TALER_ErrorCode *ec); enum TALER_ErrorCode *ec);
@ -1312,7 +1314,7 @@ TALER_EXCHANGE_batch_deposit (
* Change the chance that our deposit confirmation will be given to the * Change the chance that our deposit confirmation will be given to the
* auditor to 100%. * auditor to 100%.
* *
* @param deposit the batch deposit permission request handle * @param[in,out] deposit the batch deposit permission request handle
*/ */
void void
TALER_EXCHANGE_batch_deposit_force_dc ( TALER_EXCHANGE_batch_deposit_force_dc (
@ -1323,7 +1325,7 @@ TALER_EXCHANGE_batch_deposit_force_dc (
* Cancel a batch deposit permission request. This function cannot be used * Cancel a batch deposit permission request. This function cannot be used
* on a request handle if a response is already served for it. * on a request handle if a response is already served for it.
* *
* @param deposit the deposit permission request handle * @param[in] deposit the deposit permission request handle
*/ */
void void
TALER_EXCHANGE_batch_deposit_cancel ( TALER_EXCHANGE_batch_deposit_cancel (
@ -1543,7 +1545,7 @@ TALER_EXCHANGE_csr_melt (
const char *url, const char *url,
const struct TALER_RefreshMasterSecretP *rms, const struct TALER_RefreshMasterSecretP *rms,
unsigned int nks_len, unsigned int nks_len,
struct TALER_EXCHANGE_NonceKey *nks, struct TALER_EXCHANGE_NonceKey nks[static nks_len],
TALER_EXCHANGE_CsRMeltCallback res_cb, TALER_EXCHANGE_CsRMeltCallback res_cb,
void *res_cb_cls); void *res_cb_cls);
@ -2590,8 +2592,8 @@ typedef void
* @param exchange_url The base-URL of the exchange * @param exchange_url The base-URL of the exchange
* @param keys The /keys material from the exchange * @param keys The /keys material from the exchange
* @param reserve_priv private key of the reserve to withdraw from * @param reserve_priv private key of the reserve to withdraw from
* @param wcis inputs that determine the planchets
* @param wci_length number of entries in @a wcis * @param wci_length number of entries in @a wcis
* @param wcis inputs that determine the planchets
* @param res_cb the callback to call when the final result for this request is available * @param res_cb the callback to call when the final result for this request is available
* @param res_cb_cls closure for @a res_cb * @param res_cb_cls closure for @a res_cb
* @return NULL * @return NULL
@ -2604,8 +2606,8 @@ TALER_EXCHANGE_batch_withdraw (
const char *exchange_url, const char *exchange_url,
const struct TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_EXCHANGE_WithdrawCoinInput *wcis,
unsigned int wci_length, unsigned int wci_length,
const struct TALER_EXCHANGE_WithdrawCoinInput wcis[static wci_length],
TALER_EXCHANGE_BatchWithdrawCallback res_cb, TALER_EXCHANGE_BatchWithdrawCallback res_cb,
void *res_cb_cls); void *res_cb_cls);
@ -2802,8 +2804,8 @@ TALER_EXCHANGE_batch_withdraw2 (
const char *exchange_url, const char *exchange_url,
const struct TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_PlanchetDetail *pds,
unsigned int pds_length, unsigned int pds_length,
const struct TALER_PlanchetDetail pds[static pds_length],
TALER_EXCHANGE_BatchWithdraw2Callback res_cb, TALER_EXCHANGE_BatchWithdraw2Callback res_cb,
void *res_cb_cls); void *res_cb_cls);
@ -2901,8 +2903,8 @@ typedef void
* @param exchange_url The base url of the exchange * @param exchange_url The base url of the exchange
* @parm keys The denomination keys from the exchange * @parm keys The denomination keys from the exchange
* @param reserve_priv The pivate key to the reserve * @param reserve_priv The pivate key to the reserve
* @param coin_inputs The input for the coins to withdraw
* @param num_coins The number of elements in @e coin_inputs * @param num_coins The number of elements in @e coin_inputs
* @param coin_inputs The input for the coins to withdraw
* @param max_age The maximum age we commit to. * @param max_age The maximum age we commit to.
* @param res_cb A callback for the result, maybe NULL * @param res_cb A callback for the result, maybe NULL
* @param res_cb_cls A closure for @e res_cb, maybe NULL * @param res_cb_cls A closure for @e res_cb, maybe NULL
@ -2915,8 +2917,9 @@ TALER_EXCHANGE_age_withdraw (
const char *exchange_url, const char *exchange_url,
struct TALER_EXCHANGE_Keys *keys, struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_EXCHANGE_AgeWithdrawCoinInput *coin_inputs,
size_t num_coins, size_t num_coins,
const struct TALER_EXCHANGE_AgeWithdrawCoinInput coin_inputs[
const static num_coins],
uint8_t max_age, uint8_t max_age,
TALER_EXCHANGE_AgeWithdrawCallback res_cb, TALER_EXCHANGE_AgeWithdrawCallback res_cb,
void *res_cb_cls); void *res_cb_cls);
@ -3237,7 +3240,7 @@ TALER_EXCHANGE_refreshes_reveal (
const struct TALER_RefreshMasterSecretP *rms, const struct TALER_RefreshMasterSecretP *rms,
const struct TALER_EXCHANGE_RefreshData *rd, const struct TALER_EXCHANGE_RefreshData *rd,
unsigned int num_coins, unsigned int num_coins,
const struct TALER_ExchangeWithdrawValues *alg_values, const struct TALER_ExchangeWithdrawValues alg_values[static num_coins],
uint32_t noreveal_index, uint32_t noreveal_index,
TALER_EXCHANGE_RefreshesRevealCallback reveal_cb, TALER_EXCHANGE_RefreshesRevealCallback reveal_cb,
void *reveal_cb_cls); void *reveal_cb_cls);
@ -3708,19 +3711,19 @@ TALER_EXCHANGE_parse_reserve_history (
struct TALER_Amount *total_in, struct TALER_Amount *total_in,
struct TALER_Amount *total_out, struct TALER_Amount *total_out,
unsigned int history_length, unsigned int history_length,
struct TALER_EXCHANGE_ReserveHistoryEntry *rhistory); struct TALER_EXCHANGE_ReserveHistoryEntry rhistory[static history_length]);
/** /**
* Free memory (potentially) allocated by #TALER_EXCHANGE_parse_reserve_history(). * Free memory (potentially) allocated by #TALER_EXCHANGE_parse_reserve_history().
* *
* @param rhistory result to free
* @param len number of entries in @a rhistory * @param len number of entries in @a rhistory
* @param[in] rhistory result to free
*/ */
void void
TALER_EXCHANGE_free_reserve_history ( TALER_EXCHANGE_free_reserve_history (
struct TALER_EXCHANGE_ReserveHistoryEntry *rhistory, unsigned int len,
unsigned int len); struct TALER_EXCHANGE_ReserveHistoryEntry rhistory[static len]);
/* ********************* /recoup *********************** */ /* ********************* /recoup *********************** */
@ -6138,7 +6141,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
const struct TALER_ContractDiffiePrivateP *contract_priv, const struct TALER_ContractDiffiePrivateP *contract_priv,
const json_t *contract_terms, const json_t *contract_terms,
unsigned int num_deposits, unsigned int num_deposits,
const struct TALER_EXCHANGE_PurseDeposit *deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits],
bool upload_contract, bool upload_contract,
TALER_EXCHANGE_PurseCreateDepositCallback cb, TALER_EXCHANGE_PurseCreateDepositCallback cb,
void *cb_cls); void *cb_cls);
@ -6540,7 +6543,7 @@ TALER_EXCHANGE_purse_deposit (
const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseContractPublicKeyP *purse_pub,
uint8_t min_age, uint8_t min_age,
unsigned int num_deposits, unsigned int num_deposits,
const struct TALER_EXCHANGE_PurseDeposit *deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits],
TALER_EXCHANGE_PurseDepositCallback cb, TALER_EXCHANGE_PurseDepositCallback cb,
void *cb_cls); void *cb_cls);
@ -6681,7 +6684,8 @@ TALER_EXCHANGE_reserves_open (
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_Amount *reserve_contribution, const struct TALER_Amount *reserve_contribution,
unsigned int coin_payments_length, unsigned int coin_payments_length,
const struct TALER_EXCHANGE_PurseDeposit *coin_payments, const struct TALER_EXCHANGE_PurseDeposit coin_payments[
static coin_payments_length],
struct GNUNET_TIME_Timestamp expiration_time, struct GNUNET_TIME_Timestamp expiration_time,
uint32_t min_purses, uint32_t min_purses,
TALER_EXCHANGE_ReservesOpenCallback cb, TALER_EXCHANGE_ReservesOpenCallback cb,
@ -6692,7 +6696,7 @@ TALER_EXCHANGE_reserves_open (
* Cancel a reserve status request. This function cannot be used * Cancel a reserve status request. This function cannot be used
* on a request handle if a response is already served for it. * on a request handle if a response is already served for it.
* *
* @param roh the reserve open request handle * @param[in] roh the reserve open request handle
*/ */
void void
TALER_EXCHANGE_reserves_open_cancel ( TALER_EXCHANGE_reserves_open_cancel (
@ -6886,7 +6890,7 @@ TALER_EXCHANGE_reserves_attest (
const char *url, const char *url,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
unsigned int attributes_length, unsigned int attributes_length,
const char *const*attributes, const char *attributes[const static attributes_length],
TALER_EXCHANGE_ReservesPostAttestCallback cb, TALER_EXCHANGE_ReservesPostAttestCallback cb,
void *cb_cls); void *cb_cls);

View File

@ -356,12 +356,12 @@ reserve_age_withdraw_payment_required (
rhistory)) rhistory))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
} }
/* Check that funds were really insufficient */ /* Check that funds were really insufficient */
@ -769,17 +769,17 @@ csr_withdraw_done (
* csr-parameter via /csr-withdraw. * csr-parameter via /csr-withdraw.
* *
* @param awh The handler to the age-withdraw * @param awh The handler to the age-withdraw
* @param coin_inputs The input for the individial coin(-candidates)
* @param num_coins The number of coins in @e coin_inputs * @param num_coins The number of coins in @e coin_inputs
* * @param coin_inputs The input for the individial coin(-candidates)
* @return GNUNET_OK on success, GNUNET_SYSERR on failure * @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/ */
static static
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
prepare_coins ( prepare_coins (
struct TALER_EXCHANGE_AgeWithdrawHandle *awh, struct TALER_EXCHANGE_AgeWithdrawHandle *awh,
const struct TALER_EXCHANGE_AgeWithdrawCoinInput *coin_inputs, size_t num_coins,
size_t num_coins) const struct TALER_EXCHANGE_AgeWithdrawCoinInput coin_inputs[
static num_coins])
{ {
if (GNUNET_OK != TALER_amount_set_zero ( if (GNUNET_OK != TALER_amount_set_zero (
@ -949,8 +949,9 @@ TALER_EXCHANGE_age_withdraw (
const char *exchange_url, const char *exchange_url,
struct TALER_EXCHANGE_Keys *keys, struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_EXCHANGE_AgeWithdrawCoinInput *coin_inputs,
size_t num_coins, size_t num_coins,
const struct TALER_EXCHANGE_AgeWithdrawCoinInput coin_inputs[
const static num_coins],
uint8_t max_age, uint8_t max_age,
TALER_EXCHANGE_AgeWithdrawCallback res_cb, TALER_EXCHANGE_AgeWithdrawCallback res_cb,
void *res_cb_cls) void *res_cb_cls)
@ -976,8 +977,8 @@ TALER_EXCHANGE_age_withdraw (
return NULL; return NULL;
if (GNUNET_OK != prepare_coins (awh, if (GNUNET_OK != prepare_coins (awh,
coin_inputs, num_coins,
num_coins)) coin_inputs))
return NULL; return NULL;
/* If there were no CS denominations, we can now perform the actual /* If there were no CS denominations, we can now perform the actual

View File

@ -559,7 +559,7 @@ TALER_EXCHANGE_batch_deposit (
struct TALER_EXCHANGE_Keys *keys, struct TALER_EXCHANGE_Keys *keys,
const struct TALER_EXCHANGE_DepositContractDetail *dcd, const struct TALER_EXCHANGE_DepositContractDetail *dcd,
unsigned int num_cdds, unsigned int num_cdds,
const struct TALER_EXCHANGE_CoinDepositDetail *cdds, const struct TALER_EXCHANGE_CoinDepositDetail cdds[static num_cdds],
TALER_EXCHANGE_BatchDepositResultCallback cb, TALER_EXCHANGE_BatchDepositResultCallback cb,
void *cb_cls, void *cb_cls,
enum TALER_ErrorCode *ec) enum TALER_ErrorCode *ec)

View File

@ -270,8 +270,8 @@ phase_two (struct TALER_EXCHANGE_BatchWithdrawHandle *wh)
wh->exchange_url, wh->exchange_url,
wh->keys, wh->keys,
wh->reserve_priv, wh->reserve_priv,
pds,
wh->num_coins, wh->num_coins,
pds,
&handle_reserve_batch_withdraw_finished, &handle_reserve_batch_withdraw_finished,
wh); wh);
} }
@ -339,8 +339,8 @@ TALER_EXCHANGE_batch_withdraw (
const char *exchange_url, const char *exchange_url,
const struct TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_EXCHANGE_WithdrawCoinInput *wcis,
unsigned int wci_length, unsigned int wci_length,
const struct TALER_EXCHANGE_WithdrawCoinInput wcis[static wci_length],
TALER_EXCHANGE_BatchWithdrawCallback res_cb, TALER_EXCHANGE_BatchWithdrawCallback res_cb,
void *res_cb_cls) void *res_cb_cls)
{ {

View File

@ -229,12 +229,12 @@ reserve_batch_withdraw_payment_required (
rhistory)) rhistory))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
} }
/* Check that funds were really insufficient */ /* Check that funds were really insufficient */
@ -391,8 +391,8 @@ TALER_EXCHANGE_batch_withdraw2 (
const char *exchange_url, const char *exchange_url,
const struct TALER_EXCHANGE_Keys *keys, const struct TALER_EXCHANGE_Keys *keys,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_PlanchetDetail *pds,
unsigned int pds_length, unsigned int pds_length,
const struct TALER_PlanchetDetail pds[static pds_length],
TALER_EXCHANGE_BatchWithdraw2Callback res_cb, TALER_EXCHANGE_BatchWithdraw2Callback res_cb,
void *res_cb_cls) void *res_cb_cls)
{ {

View File

@ -654,7 +654,7 @@ TALER_EXCHANGE_parse_reserve_history (
struct TALER_Amount *total_in, struct TALER_Amount *total_in,
struct TALER_Amount *total_out, struct TALER_Amount *total_out,
unsigned int history_length, unsigned int history_length,
struct TALER_EXCHANGE_ReserveHistoryEntry *rhistory) struct TALER_EXCHANGE_ReserveHistoryEntry rhistory[static history_length])
{ {
const struct const struct
{ {
@ -753,8 +753,8 @@ TALER_EXCHANGE_parse_reserve_history (
void void
TALER_EXCHANGE_free_reserve_history ( TALER_EXCHANGE_free_reserve_history (
struct TALER_EXCHANGE_ReserveHistoryEntry *rhistory, unsigned int len,
unsigned int len) struct TALER_EXCHANGE_ReserveHistoryEntry rhistory[static len])
{ {
for (unsigned int i = 0; i<len; i++) for (unsigned int i = 0; i<len; i++)
{ {
@ -2281,10 +2281,11 @@ fail:
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_EXCHANGE_parse_accounts (const struct TALER_MasterPublicKeyP *master_pub, TALER_EXCHANGE_parse_accounts (
const json_t *accounts, const struct TALER_MasterPublicKeyP *master_pub,
struct TALER_EXCHANGE_WireAccount was[], const json_t *accounts,
unsigned int was_length) unsigned int was_length,
struct TALER_EXCHANGE_WireAccount was[static was_length])
{ {
memset (was, memset (was,
0, 0,
@ -2370,8 +2371,9 @@ TALER_EXCHANGE_parse_accounts (const struct TALER_MasterPublicKeyP *master_pub,
void void
TALER_EXCHANGE_free_accounts (struct TALER_EXCHANGE_WireAccount *was, TALER_EXCHANGE_free_accounts (
unsigned int was_len) unsigned int was_len,
struct TALER_EXCHANGE_WireAccount was[static was_len])
{ {
for (unsigned int i = 0; i<was_len; i++) for (unsigned int i = 0; i<was_len; i++)
{ {

View File

@ -221,7 +221,7 @@ TALER_EXCHANGE_csr_melt (
const char *url, const char *url,
const struct TALER_RefreshMasterSecretP *rms, const struct TALER_RefreshMasterSecretP *rms,
unsigned int nks_len, unsigned int nks_len,
struct TALER_EXCHANGE_NonceKey *nks, struct TALER_EXCHANGE_NonceKey nks[static nks_len],
TALER_EXCHANGE_CsRMeltCallback res_cb, TALER_EXCHANGE_CsRMeltCallback res_cb,
void *res_cb_cls) void *res_cb_cls)
{ {

View File

@ -506,7 +506,7 @@ TALER_EXCHANGE_purse_create_with_deposit (
const struct TALER_ContractDiffiePrivateP *contract_priv, const struct TALER_ContractDiffiePrivateP *contract_priv,
const json_t *contract_terms, const json_t *contract_terms,
unsigned int num_deposits, unsigned int num_deposits,
const struct TALER_EXCHANGE_PurseDeposit *deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits],
bool upload_contract, bool upload_contract,
TALER_EXCHANGE_PurseCreateDepositCallback cb, TALER_EXCHANGE_PurseCreateDepositCallback cb,
void *cb_cls) void *cb_cls)

View File

@ -453,7 +453,7 @@ TALER_EXCHANGE_purse_deposit (
const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseContractPublicKeyP *purse_pub,
uint8_t min_age, uint8_t min_age,
unsigned int num_deposits, unsigned int num_deposits,
const struct TALER_EXCHANGE_PurseDeposit *deposits, const struct TALER_EXCHANGE_PurseDeposit deposits[static num_deposits],
TALER_EXCHANGE_PurseDepositCallback cb, TALER_EXCHANGE_PurseDepositCallback cb,
void *cb_cls) void *cb_cls)
{ {

View File

@ -311,7 +311,7 @@ TALER_EXCHANGE_refreshes_reveal (
const struct TALER_RefreshMasterSecretP *rms, const struct TALER_RefreshMasterSecretP *rms,
const struct TALER_EXCHANGE_RefreshData *rd, const struct TALER_EXCHANGE_RefreshData *rd,
unsigned int num_coins, unsigned int num_coins,
const struct TALER_ExchangeWithdrawValues *alg_values, const struct TALER_ExchangeWithdrawValues alg_values[static num_coins],
uint32_t noreveal_index, uint32_t noreveal_index,
TALER_EXCHANGE_RefreshesRevealCallback reveal_cb, TALER_EXCHANGE_RefreshesRevealCallback reveal_cb,
void *reveal_cb_cls) void *reveal_cb_cls)

View File

@ -229,7 +229,7 @@ TALER_EXCHANGE_reserves_attest (
const char *url, const char *url,
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
unsigned int attributes_length, unsigned int attributes_length,
const char *const*attributes, const char *attributes[const static attributes_length],
TALER_EXCHANGE_ReservesPostAttestCallback cb, TALER_EXCHANGE_ReservesPostAttestCallback cb,
void *cb_cls) void *cb_cls)
{ {

View File

@ -141,8 +141,8 @@ handle_reserves_history_ok (struct TALER_EXCHANGE_ReservesHistoryHandle *rsh,
rhistory)) rhistory))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
if (NULL != rsh->cb) if (NULL != rsh->cb)
@ -153,8 +153,8 @@ handle_reserves_history_ok (struct TALER_EXCHANGE_ReservesHistoryHandle *rsh,
&rs); &rs);
rsh->cb = NULL; rsh->cb = NULL;
} }
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
} }
return GNUNET_OK; return GNUNET_OK;
} }

View File

@ -430,7 +430,8 @@ TALER_EXCHANGE_reserves_open (
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
const struct TALER_Amount *reserve_contribution, const struct TALER_Amount *reserve_contribution,
unsigned int coin_payments_length, unsigned int coin_payments_length,
const struct TALER_EXCHANGE_PurseDeposit *coin_payments, const struct TALER_EXCHANGE_PurseDeposit coin_payments[
static coin_payments_length],
struct GNUNET_TIME_Timestamp expiration_time, struct GNUNET_TIME_Timestamp expiration_time,
uint32_t min_purses, uint32_t min_purses,
TALER_EXCHANGE_ReservesOpenCallback cb, TALER_EXCHANGE_ReservesOpenCallback cb,

View File

@ -129,8 +129,8 @@ handle_reserves_status_ok (struct TALER_EXCHANGE_ReservesStatusHandle *rsh,
rhistory)) rhistory))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
GNUNET_JSON_parse_free (spec); GNUNET_JSON_parse_free (spec);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
@ -142,8 +142,8 @@ handle_reserves_status_ok (struct TALER_EXCHANGE_ReservesStatusHandle *rsh,
&rs); &rs);
rsh->cb = NULL; rsh->cb = NULL;
} }
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
} }
return GNUNET_OK; return GNUNET_OK;
} }

View File

@ -273,8 +273,8 @@ handle_wire_finished (void *cls,
if (GNUNET_OK != if (GNUNET_OK !=
TALER_EXCHANGE_parse_accounts (&master_pub, TALER_EXCHANGE_parse_accounts (&master_pub,
accounts, accounts,
was, wr.details.ok.accounts_len,
wr.details.ok.accounts_len)) was))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
wr.hr.http_status = 0; wr.hr.http_status = 0;
@ -286,8 +286,9 @@ handle_wire_finished (void *cls,
&wr); &wr);
wh->cb = NULL; wh->cb = NULL;
} }
TALER_EXCHANGE_free_accounts (was, TALER_EXCHANGE_free_accounts (
wr.details.ok.accounts_len); wr.details.ok.accounts_len,
was);
} /* end of 'parse accounts */ } /* end of 'parse accounts */
free_fees (fbm, free_fees (fbm,
wr.details.ok.fees_len); wr.details.ok.fees_len);

View File

@ -202,12 +202,12 @@ reserve_withdraw_payment_required (
rhistory)) rhistory))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
TALER_EXCHANGE_free_reserve_history (rhistory, TALER_EXCHANGE_free_reserve_history (len,
len); rhistory);
} }
/* Check that funds were really insufficient */ /* Check that funds were really insufficient */

View File

@ -326,8 +326,8 @@ batch_withdraw_run (void *cls,
TALER_TESTING_get_exchange_url (is), TALER_TESTING_get_exchange_url (is),
TALER_TESTING_get_keys (is), TALER_TESTING_get_keys (is),
rp, rp,
wcis,
ws->num_coins, ws->num_coins,
wcis,
&reserve_batch_withdraw_cb, &reserve_batch_withdraw_cb,
ws); ws);
if (NULL == ws->wsh) if (NULL == ws->wsh)