This commit is contained in:
Christian Grothoff 2020-01-18 17:06:24 +01:00
parent 48aab68ff5
commit 47deacaa15
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
16 changed files with 52 additions and 55 deletions

View File

@ -236,11 +236,11 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
* or ultimately fails. Until this has been done, the transaction is * or ultimately fails. Until this has been done, the transaction is
* in limbo (i.e. may or may not have been committed). * in limbo (i.e. may or may not have been committed).
* *
* @param eh execution to cancel * @param weh execution to cancel
*/ */
void void
TALER_BANK_execute_wire_transfer_cancel (struct TALER_BANK_execute_wire_transfer_cancel (struct
TALER_BANK_WireExecuteHandle *eh); TALER_BANK_WireExecuteHandle *weh);
/* ********************* /taler/credits *********************** */ /* ********************* /taler/credits *********************** */

View File

@ -1110,7 +1110,7 @@ struct TALER_EXCHANGE_ReserveHistory
* @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful status request
* 0 if the exchange's reply is bogus (fails to follow the protocol) * 0 if the exchange's reply is bogus (fails to follow the protocol)
* @param ec taler-specific error code, #TALER_EC_NONE on success * @param ec taler-specific error code, #TALER_EC_NONE on success
* @param[in] json original response in JSON format (useful only for diagnostics) * @param json original response in JSON format (useful only for diagnostics)
* @param balance current balance in the reserve, NULL on error * @param balance current balance in the reserve, NULL on error
* @param history_length number of entries in the transaction history, 0 on error * @param history_length number of entries in the transaction history, 0 on error
* @param history detailed transaction history, NULL on error * @param history detailed transaction history, NULL on error
@ -1648,7 +1648,7 @@ struct TALER_EXCHANGE_TrackTransactionHandle;
* @param wtid wire transfer identifier used by the exchange, NULL if exchange did not * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not
* yet execute the transaction * yet execute the transaction
* @param execution_time actual or planned execution time for the wire transfer * @param execution_time actual or planned execution time for the wire transfer
* @param coin_contribution contribution to the @a total_amount of the deposited coin (may be NULL) * @param coin_contribution contribution to the total amount by this coin (can be NULL)
*/ */
typedef void typedef void
(*TALER_EXCHANGE_TrackTransactionCallback)(void *cls, (*TALER_EXCHANGE_TrackTransactionCallback)(void *cls,
@ -1667,7 +1667,9 @@ typedef void
/** /**
* Obtain the wire transfer details for a given transaction. * Obtain the wire transfer details for a given transaction. Tells the client
* which aggregate wire transfer the deposit operation identified by @a coin_pub,
* @a merchant_priv and @a h_contract_terms contributed to.
* *
* @param exchange the exchange to query * @param exchange the exchange to query
* @param merchant_priv the merchant's private key * @param merchant_priv the merchant's private key

View File

@ -499,12 +499,12 @@ struct TALER_TESTING_Command
/** /**
* Lookup command by label. * Lookup command by label.
* *
* @param i interpreter state. * @param is interpreter state.
* @param label label of the command to lookup. * @param label label of the command to lookup.
* @return the command, if it is found, or NULL. * @return the command, if it is found, or NULL.
*/ */
const struct TALER_TESTING_Command * const struct TALER_TESTING_Command *
TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *i, TALER_TESTING_interpreter_lookup_command (struct TALER_TESTING_Interpreter *is,
const char *label); const char *label);
/** /**
@ -717,7 +717,7 @@ TALER_TESTING_setup_with_exchange_cfg (void *cls,
* *
* @param main_cb main method. * @param main_cb main method.
* @param main_cb_cls main method closure. * @param main_cb_cls main method closure.
* @param config_filename configuration file name. Is is used * @param config_file configuration file name. Is is used
* by both this function and the exchange itself. In the * by both this function and the exchange itself. In the
* first case it gives out the exchange port number and * first case it gives out the exchange port number and
* the exchange base URL so as to check whether the port * the exchange base URL so as to check whether the port
@ -754,7 +754,7 @@ TALER_TESTING_setup_with_auditor_and_exchange_cfg (void *cls,
* *
* @param main_cb main method. * @param main_cb main method.
* @param main_cb_cls main method closure. * @param main_cb_cls main method closure.
* @param config_filename configuration file name. Is is used * @param config_file configuration file name. Is is used
* by both this function and the exchange itself. In the * by both this function and the exchange itself. In the
* first case it gives out the exchange port number and * first case it gives out the exchange port number and
* the exchange base URL so as to check whether the port * the exchange base URL so as to check whether the port
@ -1180,10 +1180,10 @@ TALER_TESTING_cmd_exec_auditor_sign (const char *label,
* the desired amount as string. * the desired amount as string.
* *
* @param label command label. * @param label command label.
* @param reserve_reference command providing us with a reserve to withdraw from
* @param amount how much we withdraw. * @param amount how much we withdraw.
* @param expected_response_code which HTTP response code * @param expected_response_code which HTTP response code
* we expect from the exchange. * we expect from the exchange.
*
* @return the withdraw command to be executed by the interpreter. * @return the withdraw command to be executed by the interpreter.
*/ */
struct TALER_TESTING_Command struct TALER_TESTING_Command
@ -1884,7 +1884,6 @@ TALER_TESTING_make_trait_bank_row (const uint64_t *row);
* *
* @param index reserve priv's index number. * @param index reserve priv's index number.
* @param reserve_priv reserve private key to offer. * @param reserve_priv reserve private key to offer.
*
* @return the trait. * @return the trait.
*/ */
struct TALER_TESTING_Trait struct TALER_TESTING_Trait
@ -1912,7 +1911,7 @@ TALER_TESTING_get_trait_reserve_priv (const struct TALER_TESTING_Command *cmd,
* Offer a reserve public key. * Offer a reserve public key.
* *
* @param index reserve pubs's index number. * @param index reserve pubs's index number.
* @param reserve_priv reserve public key to offer. * @param reserve_pub reserve public key to offer.
* @return the trait. * @return the trait.
*/ */
struct TALER_TESTING_Trait struct TALER_TESTING_Trait

View File

@ -274,7 +274,7 @@ request_version (void *cls);
* *
* @param cls the `struct VersionRequest` * @param cls the `struct VersionRequest`
* @param response_code HTTP response code, 0 on error * @param response_code HTTP response code, 0 on error
* @param resp_obj parsed JSON result, NULL on error * @param gresp_obj parsed JSON result, NULL on error, must be a `const json_t *`
*/ */
static void static void
version_completed_cb (void *cls, version_completed_cb (void *cls,

View File

@ -296,7 +296,7 @@ TEAH_acc_confirmation_cb (void *cls,
/** /**
* Iterate over all available auditors for @a h, calling * Iterate over all available auditors for @a h, calling
* @param ah and giving it a chance to start a deposit * @a ac and giving it a chance to start a deposit
* confirmation interaction. * confirmation interaction.
* *
* @param h exchange to go over auditors for * @param h exchange to go over auditors for
@ -529,7 +529,7 @@ EXITIF_exit:
* Parse a exchange's auditor information encoded in JSON. * Parse a exchange's auditor information encoded in JSON.
* *
* @param[out] auditor where to return the result * @param[out] auditor where to return the result
* @param check_sig should we check signatures * @param check_sigs should we check signatures
* @param[in] auditor_obj json to parse * @param[in] auditor_obj json to parse
* @param key_data information about denomination keys * @param key_data information about denomination keys
* @return #GNUNET_OK if all is fine, #GNUNET_SYSERR if the signature is * @return #GNUNET_OK if all is fine, #GNUNET_SYSERR if the signature is
@ -758,14 +758,14 @@ update_auditors (struct TALER_EXCHANGE_Handle *exchange)
/** /**
* Compare two denomination keys. * Compare two denomination keys.
* *
* @param denoma first denomination key * @param denom1 first denomination key
* @param denomb second denomination key * @param denom2 second denomination key
* @return 0 if the two keys are equal (not necessarily * @return 0 if the two keys are equal (not necessarily
* the same object), 1 otherwise. * the same object), 1 otherwise.
*/ */
static unsigned int static unsigned int
TALER_denoms_cmp (struct TALER_EXCHANGE_DenomPublicKey *denom1, denoms_cmp (struct TALER_EXCHANGE_DenomPublicKey *denom1,
struct TALER_EXCHANGE_DenomPublicKey *denom2) struct TALER_EXCHANGE_DenomPublicKey *denom2)
{ {
struct GNUNET_CRYPTO_RsaPublicKey *tmp1; struct GNUNET_CRYPTO_RsaPublicKey *tmp1;
struct GNUNET_CRYPTO_RsaPublicKey *tmp2; struct GNUNET_CRYPTO_RsaPublicKey *tmp2;
@ -806,7 +806,7 @@ TALER_denoms_cmp (struct TALER_EXCHANGE_DenomPublicKey *denom1,
* @param[in] resp_obj JSON object to parse * @param[in] resp_obj JSON object to parse
* @param check_sig #GNUNET_YES if we should check the signature * @param check_sig #GNUNET_YES if we should check the signature
* @param[out] key_data where to store the results we decoded * @param[out] key_data where to store the results we decoded
* @param[out] where to store version compatibility data * @param[out] vc where to store version compatibility data
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
* (malformed JSON) * (malformed JSON)
*/ */
@ -948,8 +948,8 @@ decode_keys_json (const json_t *resp_obj,
j<key_data->num_denom_keys; j<key_data->num_denom_keys;
j++) j++)
{ {
if (0 == TALER_denoms_cmp (&dk, if (0 == denoms_cmp (&dk,
&key_data->denom_keys[j])) &key_data->denom_keys[j]))
{ {
found = GNUNET_YES; found = GNUNET_YES;
break; break;
@ -1521,7 +1521,7 @@ header_cb (char *buffer,
* tolerated (i.e. by re-downloading instead). * tolerated (i.e. by re-downloading instead).
* *
* @param exchange which exchange's key and wire data should be deserialized * @param exchange which exchange's key and wire data should be deserialized
* @return data the data to deserialize * @param data the data to deserialize
*/ */
static void static void
deserialize_data (struct TALER_EXCHANGE_Handle *exchange, deserialize_data (struct TALER_EXCHANGE_Handle *exchange,

View File

@ -92,7 +92,7 @@ TEAH_acc_confirmation_cb (void *cls,
/** /**
* Iterate over all available auditors for @a h, calling * Iterate over all available auditors for @a h, calling
* @param ah and giving it a chance to start a deposit * @a ac and giving it a chance to start a deposit
* confirmation interaction. * confirmation interaction.
* *
* @param h exchange to go over auditors for * @param h exchange to go over auditors for

View File

@ -115,7 +115,9 @@ do_retry (void *cls)
* @param cls closure. * @param cls closure.
* @param http_status HTTP response code. * @param http_status HTTP response code.
* @param ec taler-specific error code. * @param ec taler-specific error code.
* @param obj raw response from the auditor. * @param num_exchanges length of the @a ei array
* @param ei array with information about the exchanges
* @param raw_response raw response from the auditor.
*/ */
static void static void
exchanges_cb (void *cls, exchanges_cb (void *cls,

View File

@ -363,7 +363,7 @@ deposit_run (void *cls,
* Free the state of a "deposit" CMD, and possibly cancel a * Free the state of a "deposit" CMD, and possibly cancel a
* pending operation thereof. * pending operation thereof.
* *
* @param cls closure, typically a #struct WireState. * @param cls closure, must be a `struct DepositState`.
* @param cmd the command which is being cleaned up. * @param cmd the command which is being cleaned up.
*/ */
static void static void

View File

@ -408,14 +408,13 @@ payback_run (void *cls,
/** /**
* Cleanup the state. * Cleanup the state.
* *
* @param cls closure, typically a #struct WireState. * @param cls closure, must be a `struct RevokeState`.
* @param cmd the command which is being cleaned up. * @param cmd the command which is being cleaned up.
*/ */
static void static void
revoke_cleanup (void *cls, revoke_cleanup (void *cls,
const struct TALER_TESTING_Command *cmd) const struct TALER_TESTING_Command *cmd)
{ {
struct RevokeState *rs = cls; struct RevokeState *rs = cls;
if (NULL != rs->revoke_proc) if (NULL != rs->revoke_proc)
@ -426,7 +425,6 @@ revoke_cleanup (void *cls,
GNUNET_OS_process_destroy (rs->revoke_proc); GNUNET_OS_process_destroy (rs->revoke_proc);
rs->revoke_proc = NULL; rs->revoke_proc = NULL;
} }
GNUNET_free_non_null (rs->dhks); GNUNET_free_non_null (rs->dhks);
GNUNET_free (rs); GNUNET_free (rs);
} }

View File

@ -1022,7 +1022,7 @@ refresh_melt_run (void *cls,
* Free the "refresh melt" CMD state, and possibly cancel a * Free the "refresh melt" CMD state, and possibly cancel a
* pending operation thereof. * pending operation thereof.
* *
* @param cls closure, typically a #struct RefreshMeltState. * @param cls closure, must be a `struct RefreshMeltState`.
* @param cmd the command which is being cleaned up. * @param cmd the command which is being cleaned up.
*/ */
static void static void
@ -1099,7 +1099,7 @@ refresh_melt_traits (void *cls,
/** /**
* Parse list of amounts for melt operation. * Parse list of amounts for melt operation.
* *
* @param rms[in,out] where to store the list * @param[in,out] rms where to store the list
* @param ap NULL-termianted list of amounts to be melted (one per fresh coin) * @param ap NULL-termianted list of amounts to be melted (one per fresh coin)
* @return #GNUNET_OK on success * @return #GNUNET_OK on success
*/ */

View File

@ -68,6 +68,7 @@ struct StatusState
* @param cls closure. * @param cls closure.
* @param http_status HTTP response code. * @param http_status HTTP response code.
* @param ec taler-specific error code. * @param ec taler-specific error code.
* @param json original JSON response from the exchange
* @param balance current balance in the reserve, NULL on error. * @param balance current balance in the reserve, NULL on error.
* @param history_length number of entries in the transaction * @param history_length number of entries in the transaction
* history, 0 on error. * history, 0 on error.

View File

@ -143,17 +143,15 @@ struct TrackTransferState
* @param cls closure. * @param cls closure.
* @param http_status HTTP status code we got. * @param http_status HTTP status code we got.
* @param ec taler-specific error code. * @param ec taler-specific error code.
* @param exchange_pub public key of the exchange
* @param json original json reply (may include signatures, those * @param json original json reply (may include signatures, those
* have then been validated already). * have then been validated already).
* @param wtid wire transfer identifier, NULL if exchange did not * @param wtid wire transfer identifier, NULL if exchange did not
* execute the transaction yet. * execute the transaction yet.
* @param execution_time actual or planned execution time for the * @param execution_time actual or planned execution time for the
* wire transfer. * wire transfer.
* @param coin_contribution contribution to the @a total_amount of * @param coin_contribution contribution to the total amount of
* the deposited coin (can be NULL). * the deposited coin (can be NULL).
* @param total_amount total amount of the wire transfer, or NULL
* if the exchange could not provide any @a wtid (set only
* if @a http_status is #MHD_HTTP_OK).
*/ */
static void static void
deposit_wtid_cb (void *cls, deposit_wtid_cb (void *cls,
@ -169,6 +167,8 @@ deposit_wtid_cb (void *cls,
struct TALER_TESTING_Interpreter *is = tts->is; struct TALER_TESTING_Interpreter *is = tts->is;
struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
(void) coin_contribution;
(void) exchange_pub;
tts->tth = NULL; tts->tth = NULL;
if (tts->expected_response_code != http_status) if (tts->expected_response_code != http_status)
{ {
@ -503,6 +503,7 @@ track_transfer_cb (void *cls,
struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
struct TALER_Amount expected_amount; struct TALER_Amount expected_amount;
(void) exchange_pub;
tts->tth = NULL; tts->tth = NULL;
if (tts->expected_response_code != http_status) if (tts->expected_response_code != http_status)
{ {

View File

@ -349,7 +349,6 @@ withdraw_cleanup (void *cls,
* @param[out] ret result (could be anything) * @param[out] ret result (could be anything)
* @param trait name of the trait * @param trait name of the trait
* @param index index number of the object to offer. * @param index index number of the object to offer.
*
* @return #GNUNET_OK on success * @return #GNUNET_OK on success
*/ */
static int static int
@ -430,10 +429,10 @@ withdraw_traits (void *cls,
* the desired amount as string. * the desired amount as string.
* *
* @param label command label. * @param label command label.
* @param reserve_reference command providing us with a reserve to withdraw from
* @param amount how much we withdraw. * @param amount how much we withdraw.
* @param expected_response_code which HTTP response code * @param expected_response_code which HTTP response code
* we expect from the exchange. * we expect from the exchange.
*
* @return the withdraw command to be executed by the interpreter. * @return the withdraw command to be executed by the interpreter.
*/ */
struct TALER_TESTING_Command struct TALER_TESTING_Command
@ -446,7 +445,6 @@ TALER_TESTING_cmd_withdraw_amount (const char *label,
ws = GNUNET_new (struct WithdrawState); ws = GNUNET_new (struct WithdrawState);
ws->reserve_reference = reserve_reference; ws->reserve_reference = reserve_reference;
if (GNUNET_OK != if (GNUNET_OK !=
TALER_string_to_amount (amount, TALER_string_to_amount (amount,
&ws->amount)) &ws->amount))
@ -457,7 +455,6 @@ TALER_TESTING_cmd_withdraw_amount (const char *label,
label); label);
GNUNET_assert (0); GNUNET_assert (0);
} }
ws->expected_response_code = expected_response_code; ws->expected_response_code = expected_response_code;
{ {
struct TALER_TESTING_Command cmd = { struct TALER_TESTING_Command cmd = {

View File

@ -105,10 +105,9 @@ struct MainWrapperContext
* @param compat protocol compatibility information * @param compat protocol compatibility information
*/ */
static void static void
auditor_version_cb auditor_version_cb (void *cls,
(void *cls, const struct TALER_AUDITOR_VersionInformation *vi,
const struct TALER_AUDITOR_VersionInformation *vi, enum TALER_AUDITOR_VersionCompatibility compat)
enum TALER_AUDITOR_VersionCompatibility compat)
{ {
struct TALER_TESTING_Interpreter *is = cls; struct TALER_TESTING_Interpreter *is = cls;
@ -126,7 +125,7 @@ auditor_version_cb
* Setup the @a is 'auditor' member before running the main test loop. * Setup the @a is 'auditor' member before running the main test loop.
* *
* @param cls must be a `struct MainWrapperContext *` * @param cls must be a `struct MainWrapperContext *`
* @param is[in,out] interpreter state to setup * @param[in,out] is interpreter state to setup
*/ */
static void static void
auditor_main_wrapper (void *cls, auditor_main_wrapper (void *cls,

View File

@ -376,8 +376,7 @@ struct SignInfo
* Sign the keys for an exchange given configuration @a cfg. * Sign the keys for an exchange given configuration @a cfg.
* The information to be signed must be in a file "auditor.in". * The information to be signed must be in a file "auditor.in".
* *
* @param cls[in,out] a `struct SignInfo` with * @param[in,out] cls a `struct SignInfo` with further paramters
* further paramters
* @param cfg configuration to use * @param cfg configuration to use
* @return #GNUNET_OK on success * @return #GNUNET_OK on success
*/ */
@ -680,17 +679,17 @@ TALER_TESTING_wait_auditor_ready (const char *base_url)
int int
TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb, TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
void *main_cb_cls, void *main_cb_cls,
const char *config_filename) const char *config_file)
{ {
struct TALER_TESTING_SetupContext setup_ctx = { struct TALER_TESTING_SetupContext setup_ctx = {
.config_filename = config_filename, .config_filename = config_file,
.main_cb = main_cb, .main_cb = main_cb,
.main_cb_cls = main_cb_cls .main_cb_cls = main_cb_cls
}; };
int result; int result;
result = result =
GNUNET_CONFIGURATION_parse_and_run (config_filename, GNUNET_CONFIGURATION_parse_and_run (config_file,
&TALER_TESTING_setup_with_exchange_cfg, &TALER_TESTING_setup_with_exchange_cfg,
&setup_ctx); &setup_ctx);
if (GNUNET_OK != result) if (GNUNET_OK != result)
@ -917,7 +916,7 @@ TALER_TESTING_setup_with_auditor_and_exchange_cfg (void *cls,
* *
* @param main_cb main method. * @param main_cb main method.
* @param main_cb_cls main method closure. * @param main_cb_cls main method closure.
* @param config_filename configuration file name. Is is used * @param config_file configuration file name. Is is used
* by both this function and the exchange itself. In the * by both this function and the exchange itself. In the
* first case it gives out the exchange port number and * first case it gives out the exchange port number and
* the exchange base URL so as to check whether the port * the exchange base URL so as to check whether the port

View File

@ -40,14 +40,13 @@
* kind of traits do not need this index. For * kind of traits do not need this index. For
* example, a "batch" CMD returns always the * example, a "batch" CMD returns always the
* CMD currently being executed. * CMD currently being executed.
* @param[out] cmd_ where to write the wire details. * @param[out] _cmd where to write the wire details.
* @return #GNUNET_OK on success. * @return #GNUNET_OK on success.
*/ */
int int
TALER_TESTING_get_trait_cmd TALER_TESTING_get_trait_cmd (const struct TALER_TESTING_Command *cmd,
(const struct TALER_TESTING_Command *cmd, unsigned int index,
unsigned int index, struct TALER_TESTING_Command **_cmd)
struct TALER_TESTING_Command **_cmd)
{ {
return cmd->traits (cmd->cls, return cmd->traits (cmd->cls,
(const void **) _cmd, (const void **) _cmd,