From 88ecba945e5d89bfda14f9a169201d303c1892c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Tue, 11 Jul 2023 09:06:28 +0200 Subject: [PATCH] -handle doxygen complaints --- .../taler-exchange-httpd_age-withdraw.c | 14 ++-- ...taler-exchange-httpd_age-withdraw_reveal.c | 6 +- src/include/taler_exchange_service.h | 7 +- src/include/taler_testing_lib.h | 67 ++++++++++--------- src/lib/auditor_api_get_config.c | 2 +- src/lib/exchange_api_age_withdraw.c | 4 +- .../testing_api_cmd_auditor_exchanges.c | 6 +- 7 files changed, 50 insertions(+), 56 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_age-withdraw.c b/src/exchange/taler-exchange-httpd_age-withdraw.c index 2f30ad8f6..eb7c67c0a 100644 --- a/src/exchange/taler-exchange-httpd_age-withdraw.c +++ b/src/exchange/taler-exchange-httpd_age-withdraw.c @@ -106,7 +106,7 @@ free_age_withdraw_context_resources (struct AgeWithdrawContext *awc) * @param connection The MHD connection to handle * @param j_denoms_h Array of n hashes of the denominations for the withdrawal, in JSON format * @param j_blinded_coin_evs Array of n arrays of kappa blinded envelopes of in JSON format for the coins. - * @param[out] aws The context of the operation, only partially built at call time + * @param[out] awc The context of the operation, only partially built at call time * @param[out] mhd_ret The result if a reply is queued for MHD * @return true on success, false on failure, with a reply already queued for MHD */ @@ -315,7 +315,7 @@ EXIT: * @param connection HTTP-connection to the client * @param ksh The handle to the current state of (denomination) keys in the exchange * @param denom_h Hash of the denomination key to check - * @param[out] dk On success, will contain the denomination key details + * @param[out] pdk On success, will contain the denomination key details * @param[out] result On failure, an MHD-response will be qeued and result will be set to accordingly * @return true on success (denomination valid), false otherwise */ @@ -402,7 +402,7 @@ denomination_is_valid ( * * @param connection The HTTP connection to the client * @param len The lengths of the array @a denoms_h - * @param denoms_h array of hashes of denomination public keys + * @param denom_hs array of hashes of denomination public keys * @param coin_evs array of blinded coin planchets * @param[out] denom_serials On success, will be filled with the serial-id's of the denomination keys. Caller must deallocate. * @param[out] amount_with_fee On succes, will contain the committed amount including fees @@ -511,8 +511,7 @@ static enum GNUNET_GenericReturnValue verify_reserve_signature ( struct MHD_Connection *connection, const struct TALER_EXCHANGEDB_AgeWithdraw *commitment, - enum MHD_Result *mhd_ret - ) + enum MHD_Result *mhd_ret) { TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++; @@ -824,10 +823,7 @@ age_withdraw_transaction (void *cls, * 2.) age withdraw was successful. * * @param connection HTTP-connection to the client - * @param h_commitment Original commitment - * @param num_coins Number of coins - * @param coin_evs The Hashes of the undisclosed, blinded coins, @a num_coins many - * @param denom_keys The array of denomination keys, @a num_coins. Needed to detect Clause-Schnorr-based denominations + * @param awc The context for the current age withdraw request * @param[out] result On error, a HTTP-response will be queued and result set accordingly * @return GNUNET_OK on success, GNUNET_SYSERR otherwise */ diff --git a/src/exchange/taler-exchange-httpd_age-withdraw_reveal.c b/src/exchange/taler-exchange-httpd_age-withdraw_reveal.c index 60f036f81..ddb1250de 100644 --- a/src/exchange/taler-exchange-httpd_age-withdraw_reveal.c +++ b/src/exchange/taler-exchange-httpd_age-withdraw_reveal.c @@ -81,8 +81,6 @@ struct AgeRevealContext * memory for those. * * @param connection The MHD connection to handle - * @param j_denoms_h Array of hashes of the denominations for the withdrawal, in JSON format - * @param j_coin_evs The blinded envelopes in JSON format for the coins that are not revealed and will be signed on success * @param j_disclosed_coin_secrets The n*(kappa-1) disclosed coins' private keys in JSON format, from which all other attributes (age restriction, blinding, nonce) will be derived from * @param[out] actx The context of the operation, only partially built at call time * @param[out] mhd_ret The result if a reply is queued for MHD @@ -235,11 +233,11 @@ find_original_commitment ( * @brief Derives a age-restricted planchet from a given secret and calculates the hash * * @param connection Connection to the client - * @param ksh The denomination keys in memory + * @param keys The denomination keys in memory * @param secret The secret to a planchet * @param denom_pub_h The hash of the denomination for the planchet * @param max_age The maximum age allowed - * @param[out] hc Hashcode to write + * @param[out] bch Hashcode to write * @param[out] result On error, a HTTP-response will be queued and result set accordingly * @return GNUNET_OK on success, GNUNET_SYSERR otherwise, with an error message * written to the client and @e result set. diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 8e36bc516..4848ddfdd 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -2825,7 +2825,7 @@ typedef void * * @param curl_ctx The curl context * @param exchange_url The base url of the exchange - * @parm keys The denomination keys from the exchange + * @param keys The denomination keys from the exchange * @param reserve_priv The pivate key to the reserve * @param num_coins The number of elements in @e coin_inputs * @param coin_inputs The input for the coins to withdraw @@ -2842,8 +2842,8 @@ TALER_EXCHANGE_age_withdraw ( struct TALER_EXCHANGE_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, size_t num_coins, - const struct TALER_EXCHANGE_AgeWithdrawCoinInput coin_inputs[ - const static num_coins], + const struct TALER_EXCHANGE_AgeWithdrawCoinInput coin_inputs[const static + num_coins], uint8_t max_age, TALER_EXCHANGE_AgeWithdrawCallback res_cb, void *res_cb_cls); @@ -3144,7 +3144,6 @@ struct TALER_EXCHANGE_RefreshesRevealHandle; * * @param ctx curl context * @param url exchange base URL - * @param keys exchange keys * @param rms the fresh secret that defines the refresh operation * @param rd the refresh data that characterizes the refresh operation * @param num_coins number of fresh coins to be created, length of the @a exchange_vals array, must match value in @a rd diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index d8793f4a3..374ab7afe 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -59,7 +59,7 @@ * @param status unexpected HTTP status code received * @param expected expected HTTP status code */ -#define TALER_TESTING_unexpected_status(is,status, expected) \ +#define TALER_TESTING_unexpected_status(is,status,expected) \ do { \ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \ "Unexpected response code %u (expected: %u) to command %s in %s:%u\n", \ @@ -81,7 +81,7 @@ * @param expected expected HTTP status code * @param body received JSON-reply */ -#define TALER_TESTING_unexpected_status_with_body(is,status, expected, body) \ +#define TALER_TESTING_unexpected_status_with_body(is,status,expected,body) \ do { \ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, \ "Unexpected response code %u (expected: %u) to " \ @@ -111,7 +111,7 @@ __FILE__, \ __LINE__, \ TALER_TESTING_interpreter_get_current_label (is)); \ - }while (0) + } while (0) /** @@ -2210,6 +2210,7 @@ TALER_TESTING_cmd_proof_kyc_oauth2 ( * KYC processes which also provides a @a birthdate in a response * * @param label command label + * @param birthdate fixed birthdate, such as "2022-03-04", "2022-03-00", "2022-00-00" * @param port the TCP port to listen on */ struct TALER_TESTING_Command @@ -2463,6 +2464,30 @@ TALER_TESTING_cmd_check_aml_decisions ( unsigned int expected_http_status); +/* ****************** convenience functions ************** */ + +/** + * Get exchange URL from interpreter. Convenience function. + * + * @param is interpreter state. + * @return the exchange URL, or NULL on error + */ +const char * +TALER_TESTING_get_exchange_url ( + struct TALER_TESTING_Interpreter *is); + + +/** + * Get exchange keys from interpreter. Convenience function. + * + * @param is interpreter state. + * @return the exchange keys, or NULL on error + */ +struct TALER_EXCHANGE_Keys * +TALER_TESTING_get_keys ( + struct TALER_TESTING_Interpreter *is); + + /* *** Generic trait logic for implementing traits ********* */ @@ -2621,13 +2646,13 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, op (bank_row, const uint64_t) \ op (officer_pub, const struct TALER_AmlOfficerPublicKeyP) \ op (officer_priv, const struct TALER_AmlOfficerPrivateKeyP) \ - op (officer_name, const char) \ + op (officer_name, const char) \ op (aml_decision, enum TALER_AmlDecisionState) \ - op (aml_justification, const char) \ - op (auditor_priv, const struct TALER_AuditorPrivateKeyP) \ - op (auditor_pub, const struct TALER_AuditorPublicKeyP) \ - op (master_priv, const struct TALER_MasterPrivateKeyP) \ - op (master_pub, const struct TALER_MasterPublicKeyP) \ + op (aml_justification, const char) \ + op (auditor_priv, const struct TALER_AuditorPrivateKeyP) \ + op (auditor_pub, const struct TALER_AuditorPublicKeyP) \ + op (master_priv, const struct TALER_MasterPrivateKeyP) \ + op (master_pub, const struct TALER_MasterPublicKeyP) \ op (purse_priv, const struct TALER_PurseContractPrivateKeyP) \ op (purse_pub, const struct TALER_PurseContractPublicKeyP) \ op (merge_priv, const struct TALER_PurseMergePrivateKeyP) \ @@ -2702,28 +2727,4 @@ TALER_TESTING_SIMPLE_TRAITS (TALER_TESTING_MAKE_DECL_SIMPLE_TRAIT) TALER_TESTING_INDEXED_TRAITS (TALER_TESTING_MAKE_DECL_INDEXED_TRAIT) -/* ****************** convenience functions ************** */ - -/** - * Get exchange URL from interpreter. Convenience function. - * - * @param is interpreter state. - * @return the exchange URL, or NULL on error - */ -const char * -TALER_TESTING_get_exchange_url ( - struct TALER_TESTING_Interpreter *is); - - -/** - * Get exchange keys from interpreter. Convenience function. - * - * @param is interpreter state. - * @return the exchange keys, or NULL on error - */ -struct TALER_EXCHANGE_Keys * -TALER_TESTING_get_keys ( - struct TALER_TESTING_Interpreter *is); - - #endif diff --git a/src/lib/auditor_api_get_config.c b/src/lib/auditor_api_get_config.c index ede702a0d..c9f366568 100644 --- a/src/lib/auditor_api_get_config.c +++ b/src/lib/auditor_api_get_config.c @@ -95,7 +95,7 @@ struct TALER_AUDITOR_GetConfigHandle * in the @a key_data. * * @param[in] resp_obj JSON object to parse - * @param[in,out] auditor where to store the results we decoded + * @param[in,out] vi where to store the results we decoded * @param[out] vc where to store config compatibility data * @return #TALER_EC_NONE on success */ diff --git a/src/lib/exchange_api_age_withdraw.c b/src/lib/exchange_api_age_withdraw.c index 9122dff70..7bad025b2 100644 --- a/src/lib/exchange_api_age_withdraw.c +++ b/src/lib/exchange_api_age_withdraw.c @@ -382,7 +382,8 @@ reserve_age_withdraw_payment_required ( * HTTP /reserves/$RESERVE_PUB/age-withdraw request. * * @param cls the `struct TALER_EXCHANGE_AgeWithdrawHandle` - * @param aw2r response data + * @param response_code The HTTP response code + * @param response response data */ static void handle_reserve_age_withdraw_finished ( @@ -651,6 +652,7 @@ ERROR: * Prepares the request URL for the age-withdraw request * * @param awh The handler + * @param exchange_url The base-URL to the exchange */ static enum GNUNET_GenericReturnValue diff --git a/src/testing/testing_api_cmd_auditor_exchanges.c b/src/testing/testing_api_cmd_auditor_exchanges.c index 29d3726ae..c554e5b84 100644 --- a/src/testing/testing_api_cmd_auditor_exchanges.c +++ b/src/testing/testing_api_cmd_auditor_exchanges.c @@ -120,10 +120,8 @@ do_retry (void *cls) /** * Callback to analyze the /exchanges response. * - * @param cls closure. - * @param hr HTTP response details - * @param num_exchanges length of the @a ei array - * @param ei array with information about the exchanges + * @param cls closure of type struct ExchangesState* + * @param ler Response to the GET /exchanges request */ static void exchanges_cb (void *cls,