From 47deacaa152dd39e61615225e14e7a93be9f2a97 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 18 Jan 2020 17:06:24 +0100 Subject: doxygen --- src/lib/auditor_api_handle.c | 2 +- src/lib/exchange_api_handle.c | 20 ++++++++++---------- src/lib/exchange_api_handle.h | 2 +- src/lib/testing_api_cmd_auditor_exchanges.c | 4 +++- src/lib/testing_api_cmd_deposit.c | 2 +- src/lib/testing_api_cmd_payback.c | 4 +--- src/lib/testing_api_cmd_refresh.c | 4 ++-- src/lib/testing_api_cmd_status.c | 1 + src/lib/testing_api_cmd_track.c | 9 +++++---- src/lib/testing_api_cmd_withdraw.c | 5 +---- src/lib/testing_api_helpers_auditor.c | 9 ++++----- src/lib/testing_api_helpers_exchange.c | 11 +++++------ src/lib/testing_api_trait_cmd.c | 9 ++++----- 13 files changed, 39 insertions(+), 43 deletions(-) (limited to 'src/lib') diff --git a/src/lib/auditor_api_handle.c b/src/lib/auditor_api_handle.c index aa0489a30..d38de34ff 100644 --- a/src/lib/auditor_api_handle.c +++ b/src/lib/auditor_api_handle.c @@ -274,7 +274,7 @@ request_version (void *cls); * * @param cls the `struct VersionRequest` * @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 version_completed_cb (void *cls, diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 41aed278c..9ee64c4c5 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -296,7 +296,7 @@ TEAH_acc_confirmation_cb (void *cls, /** * 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. * * @param h exchange to go over auditors for @@ -529,7 +529,7 @@ EXITIF_exit: * Parse a exchange's auditor information encoded in JSON. * * @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 key_data information about denomination keys * @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. * - * @param denoma first denomination key - * @param denomb second denomination key + * @param denom1 first denomination key + * @param denom2 second denomination key * @return 0 if the two keys are equal (not necessarily * the same object), 1 otherwise. */ static unsigned int -TALER_denoms_cmp (struct TALER_EXCHANGE_DenomPublicKey *denom1, - struct TALER_EXCHANGE_DenomPublicKey *denom2) +denoms_cmp (struct TALER_EXCHANGE_DenomPublicKey *denom1, + struct TALER_EXCHANGE_DenomPublicKey *denom2) { struct GNUNET_CRYPTO_RsaPublicKey *tmp1; 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 check_sig #GNUNET_YES if we should check the signature * @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 * (malformed JSON) */ @@ -948,8 +948,8 @@ decode_keys_json (const json_t *resp_obj, jnum_denom_keys; j++) { - if (0 == TALER_denoms_cmp (&dk, - &key_data->denom_keys[j])) + if (0 == denoms_cmp (&dk, + &key_data->denom_keys[j])) { found = GNUNET_YES; break; @@ -1521,7 +1521,7 @@ header_cb (char *buffer, * tolerated (i.e. by re-downloading instead). * * @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 deserialize_data (struct TALER_EXCHANGE_Handle *exchange, diff --git a/src/lib/exchange_api_handle.h b/src/lib/exchange_api_handle.h index 1aefbd655..e0acc4e6d 100644 --- a/src/lib/exchange_api_handle.h +++ b/src/lib/exchange_api_handle.h @@ -92,7 +92,7 @@ TEAH_acc_confirmation_cb (void *cls, /** * 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. * * @param h exchange to go over auditors for diff --git a/src/lib/testing_api_cmd_auditor_exchanges.c b/src/lib/testing_api_cmd_auditor_exchanges.c index b51a9276b..d021b0d34 100644 --- a/src/lib/testing_api_cmd_auditor_exchanges.c +++ b/src/lib/testing_api_cmd_auditor_exchanges.c @@ -115,7 +115,9 @@ do_retry (void *cls) * @param cls closure. * @param http_status HTTP response 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 exchanges_cb (void *cls, diff --git a/src/lib/testing_api_cmd_deposit.c b/src/lib/testing_api_cmd_deposit.c index 94636b7cf..c85cb58cf 100644 --- a/src/lib/testing_api_cmd_deposit.c +++ b/src/lib/testing_api_cmd_deposit.c @@ -363,7 +363,7 @@ deposit_run (void *cls, * Free the state of a "deposit" CMD, and possibly cancel a * 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. */ static void diff --git a/src/lib/testing_api_cmd_payback.c b/src/lib/testing_api_cmd_payback.c index 1fdd2bfea..41e60b04d 100644 --- a/src/lib/testing_api_cmd_payback.c +++ b/src/lib/testing_api_cmd_payback.c @@ -408,14 +408,13 @@ payback_run (void *cls, /** * 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. */ static void revoke_cleanup (void *cls, const struct TALER_TESTING_Command *cmd) { - struct RevokeState *rs = cls; if (NULL != rs->revoke_proc) @@ -426,7 +425,6 @@ revoke_cleanup (void *cls, GNUNET_OS_process_destroy (rs->revoke_proc); rs->revoke_proc = NULL; } - GNUNET_free_non_null (rs->dhks); GNUNET_free (rs); } diff --git a/src/lib/testing_api_cmd_refresh.c b/src/lib/testing_api_cmd_refresh.c index 44911a6df..c4dcc3c62 100644 --- a/src/lib/testing_api_cmd_refresh.c +++ b/src/lib/testing_api_cmd_refresh.c @@ -1022,7 +1022,7 @@ refresh_melt_run (void *cls, * Free the "refresh melt" CMD state, and possibly cancel a * 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. */ static void @@ -1099,7 +1099,7 @@ refresh_melt_traits (void *cls, /** * 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) * @return #GNUNET_OK on success */ diff --git a/src/lib/testing_api_cmd_status.c b/src/lib/testing_api_cmd_status.c index 757ca9951..41d2c326e 100644 --- a/src/lib/testing_api_cmd_status.c +++ b/src/lib/testing_api_cmd_status.c @@ -68,6 +68,7 @@ struct StatusState * @param cls closure. * @param http_status HTTP response 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 history_length number of entries in the transaction * history, 0 on error. diff --git a/src/lib/testing_api_cmd_track.c b/src/lib/testing_api_cmd_track.c index bb70c5bad..51ad45be4 100644 --- a/src/lib/testing_api_cmd_track.c +++ b/src/lib/testing_api_cmd_track.c @@ -143,17 +143,15 @@ struct TrackTransferState * @param cls closure. * @param http_status HTTP status code we got. * @param ec taler-specific error code. + * @param exchange_pub public key of the exchange * @param json original json reply (may include signatures, those * have then been validated already). * @param wtid wire transfer identifier, NULL if exchange did not * execute the transaction yet. * @param execution_time actual or planned execution time for the * 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). - * @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 deposit_wtid_cb (void *cls, @@ -169,6 +167,8 @@ deposit_wtid_cb (void *cls, struct TALER_TESTING_Interpreter *is = tts->is; struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; + (void) coin_contribution; + (void) exchange_pub; tts->tth = NULL; 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_Amount expected_amount; + (void) exchange_pub; tts->tth = NULL; if (tts->expected_response_code != http_status) { diff --git a/src/lib/testing_api_cmd_withdraw.c b/src/lib/testing_api_cmd_withdraw.c index 460a55d4e..b6d8b32ab 100644 --- a/src/lib/testing_api_cmd_withdraw.c +++ b/src/lib/testing_api_cmd_withdraw.c @@ -349,7 +349,6 @@ withdraw_cleanup (void *cls, * @param[out] ret result (could be anything) * @param trait name of the trait * @param index index number of the object to offer. - * * @return #GNUNET_OK on success */ static int @@ -430,10 +429,10 @@ withdraw_traits (void *cls, * the desired amount as string. * * @param label command label. + * @param reserve_reference command providing us with a reserve to withdraw from * @param amount how much we withdraw. * @param expected_response_code which HTTP response code * we expect from the exchange. - * * @return the withdraw command to be executed by the interpreter. */ struct TALER_TESTING_Command @@ -446,7 +445,6 @@ TALER_TESTING_cmd_withdraw_amount (const char *label, ws = GNUNET_new (struct WithdrawState); ws->reserve_reference = reserve_reference; - if (GNUNET_OK != TALER_string_to_amount (amount, &ws->amount)) @@ -457,7 +455,6 @@ TALER_TESTING_cmd_withdraw_amount (const char *label, label); GNUNET_assert (0); } - ws->expected_response_code = expected_response_code; { struct TALER_TESTING_Command cmd = { diff --git a/src/lib/testing_api_helpers_auditor.c b/src/lib/testing_api_helpers_auditor.c index ff85c0c85..26585f5b9 100644 --- a/src/lib/testing_api_helpers_auditor.c +++ b/src/lib/testing_api_helpers_auditor.c @@ -105,10 +105,9 @@ struct MainWrapperContext * @param compat protocol compatibility information */ static void -auditor_version_cb - (void *cls, - const struct TALER_AUDITOR_VersionInformation *vi, - enum TALER_AUDITOR_VersionCompatibility compat) +auditor_version_cb (void *cls, + const struct TALER_AUDITOR_VersionInformation *vi, + enum TALER_AUDITOR_VersionCompatibility compat) { 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. * * @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 auditor_main_wrapper (void *cls, diff --git a/src/lib/testing_api_helpers_exchange.c b/src/lib/testing_api_helpers_exchange.c index 1aeff16d8..5979fc015 100644 --- a/src/lib/testing_api_helpers_exchange.c +++ b/src/lib/testing_api_helpers_exchange.c @@ -376,8 +376,7 @@ struct SignInfo * Sign the keys for an exchange given configuration @a cfg. * The information to be signed must be in a file "auditor.in". * - * @param cls[in,out] a `struct SignInfo` with - * further paramters + * @param[in,out] cls a `struct SignInfo` with further paramters * @param cfg configuration to use * @return #GNUNET_OK on success */ @@ -680,17 +679,17 @@ TALER_TESTING_wait_auditor_ready (const char *base_url) int TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb, void *main_cb_cls, - const char *config_filename) + const char *config_file) { struct TALER_TESTING_SetupContext setup_ctx = { - .config_filename = config_filename, + .config_filename = config_file, .main_cb = main_cb, .main_cb_cls = main_cb_cls }; int result; result = - GNUNET_CONFIGURATION_parse_and_run (config_filename, + GNUNET_CONFIGURATION_parse_and_run (config_file, &TALER_TESTING_setup_with_exchange_cfg, &setup_ctx); 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_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 * first case it gives out the exchange port number and * the exchange base URL so as to check whether the port diff --git a/src/lib/testing_api_trait_cmd.c b/src/lib/testing_api_trait_cmd.c index 0c7dc0c86..7982f8e8d 100644 --- a/src/lib/testing_api_trait_cmd.c +++ b/src/lib/testing_api_trait_cmd.c @@ -40,14 +40,13 @@ * kind of traits do not need this index. For * example, a "batch" CMD returns always the * 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. */ int -TALER_TESTING_get_trait_cmd - (const struct TALER_TESTING_Command *cmd, - unsigned int index, - struct TALER_TESTING_Command **_cmd) +TALER_TESTING_get_trait_cmd (const struct TALER_TESTING_Command *cmd, + unsigned int index, + struct TALER_TESTING_Command **_cmd) { return cmd->traits (cmd->cls, (const void **) _cmd, -- cgit v1.2.3