This commit is contained in:
Christian Grothoff 2020-01-17 23:01:17 +01:00
parent cd1a784f34
commit b322614eb2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
26 changed files with 58 additions and 56 deletions

View File

@ -590,7 +590,7 @@ report_amount_arithmetic_inconsistency (const char *operation,
* @param coin_pub affected coin
* @param exchange amount calculated by exchange
* @param auditor amount calculated by auditor
* @param proftable 1 if @a exchange being larger than @a auditor is
* @param profitable 1 if @a exchange being larger than @a auditor is
* profitable for the exchange for this operation,
* -1 if @a exchange being smaller than @a auditor is
* profitable for the exchange, and 0 if it is unclear

View File

@ -729,7 +729,7 @@ check_pending_rc (void *cls,
*
* @param receiver_account payto://-URI of the account
* @param wtid wire transfer identifier used
* @param key[out] set to the key
* @param[out] key set to the key
*/
static void
hash_rc (const char *receiver_account,
@ -1343,6 +1343,7 @@ check_exchange_wire_out (struct WireAccount *wa)
* @param ec error code in case something went wrong
* @param row_off identification of the position at which we are querying
* @param details details about the wire transfer
* @param json original response in JSON format
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
*/
static int

View File

@ -35,7 +35,7 @@
* when fetching amounts from the database.
*
* @param field name of the database field to fetch amount from
* @param amountp[out] pointer to amount to set
* @param[out] amountp pointer to amount to set
*/
#define TALER_PQ_RESULT_SPEC_AMOUNT(field,amountp) TALER_PQ_result_spec_amount ( \
field,pg->currency,amountp)
@ -45,7 +45,7 @@
* when fetching amounts from the database. NBO variant.
*
* @param field name of the database field to fetch amount from
* @param amountp[out] pointer to amount to set
* @param[out] amountp pointer to amount to set
*/
#define TALER_PQ_RESULT_SPEC_AMOUNT_NBO(field, \
amountp) TALER_PQ_result_spec_amount_nbo ( \
@ -992,7 +992,7 @@ struct ExchangeInfoContext
/**
* Helper function for #postgres_auditor_list_exchanges().
* Helper function for #postgres_list_exchanges().
* To be called with the results of a SELECT statement
* that has returned @a num_results results.
*
@ -1988,7 +1988,6 @@ postgres_update_wire_auditor_account_progress (void *cls,
* @param[out] pp where is the auditor in processing
* @param[out] in_wire_off how far are we in the incoming wire transaction history
* @param[out] out_wire_off how far are we in the outgoing wire transaction history
* @param[out] wire_off_size how many bytes do @a in_wire_off and @a out_wire_off take?
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus

View File

@ -40,7 +40,7 @@ struct TALER_BANK_AdminAddIncomingHandle
/**
* POST context.
*/
struct TEAH_PostContext post_ctx;
struct TALER_CURL_PostContext post_ctx;
/**
* Handle for the request.

View File

@ -124,7 +124,7 @@ struct TALER_BANK_WireExecuteHandle
/**
* POST context.
*/
struct TEAH_PostContext post_ctx;
struct TALER_CURL_PostContext post_ctx;
/**
* Handle for the request.

View File

@ -283,7 +283,7 @@ TALER_FAKEBANK_check_debit (struct TALER_FAKEBANK_Handle *h,
* @param h bank instance
* @param want_amount transfer amount desired
* @param want_debit account that should have been debited
* @param want_debit account that should have been credited
* @param want_credit account that should have been credited
* @param reserve_pub reserve public key expected in wire subject
* @return #GNUNET_OK on success
*/
@ -450,7 +450,8 @@ TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h,
/**
* Check that no wire transfers were ordered (or at least none
* that have not been taken care of via #TALER_FAKEBANK_check()).
* that have not been taken care of via #TALER_FAKEBANK_check_credit()
* or #TALER_FAKEBANK_check_debit()).
* If any transactions are onrecord, return #GNUNET_SYSERR.
*
* @param h bank instance
@ -819,8 +820,7 @@ struct HistoryArgs
* /history/incoming and /history/outgoing.
*
* @param connection MHD connection.
* @param function_name name of the caller.
* @param ha[out] will contain the parsed values.
* @param[out] ha will contain the parsed values.
* @return GNUNET_OK only if the parsing succeedes.
*/
static int

View File

@ -32,13 +32,13 @@
/**
* Add the @a body as POST data to the easy handle in @a ctx.
*
* @param ctx[in,out] a request context (updated)
* @param[in,out] ctx a request context (updated)
* @param eh easy handle to use
* @param body JSON body to add to @e ctx
* @return #GNUNET_OK on success #GNUNET_SYSERR on failure
*/
int
TALER_curl_easy_post (struct TEAH_PostContext *ctx,
TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx,
CURL *eh,
const json_t *body)
{
@ -104,12 +104,13 @@ TALER_curl_easy_post (struct TEAH_PostContext *ctx,
/**
* Free the data in @a ctx.
*
* @param ctx[in] a request context (updated)
* @param[in] ctx a request context (updated)
*/
void
TALER_curl_easy_post_finished (struct TEAH_PostContext *ctx)
TALER_curl_easy_post_finished (struct TALER_CURL_PostContext *ctx)
{
curl_slist_free_all (ctx->headers);
ctx->headers = NULL;
GNUNET_free_non_null (ctx->json_enc);
ctx->json_enc = NULL;
}

View File

@ -99,12 +99,12 @@ static struct GNUNET_CURL_RescheduleContext *rc;
* history returned by the bank.
*
* @param cls closure
* @param http_status HTTP status code from server
* @param ec taler error code
* @param dir direction of the transfer
* @param row_off identification of the position at
* which we are querying
* @param row_off_size number of bytes in @a row_off
* @param serial_id identification of the position at
* which we are returning data
* @param details details about the wire transfer
* @param json original full response from server
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to
* abort iteration
*/

View File

@ -337,7 +337,7 @@ advance_fees (struct WireAccount *wa,
/**
* Update wire transfer fee data structure in @a wp.
*
* @param wp wire transfer fee data structure to update
* @param wa wire account data structure to update
* @param now timestamp to update fees to
* @param session DB session to use
* @return transaction status

View File

@ -82,7 +82,7 @@ TEH_DB_know_coin_transaction (void *cls,
*
* @param connection MHD connection to run @a cb for
* @param name name of the transaction (for debugging)
* @param[out] set to MHD response code, if transaction failed
* @param[out] mhd_ret set to MHD response code, if transaction failed
* @param cb callback implementing transaction logic
* @param cb_cls closure for @a cb, must be read-only!
* @return #GNUNET_OK on success, #GNUNET_SYSERR on failure

View File

@ -955,7 +955,6 @@ sign_key_issue_to_json (const struct TALER_ExchangeSigningKeyValidityPS *ski,
* @param cls closure with the `struct ResponseFactoryContext *`
* @param filename name of the file the key came from
* @param ski the sign key issue
* @param ski_sig signature over @a ski
* @return #GNUNET_OK to continue to iterate,
* #GNUNET_NO to stop iteration with no error,
* #GNUNET_SYSERR to abort iteration with error!
@ -1589,7 +1588,7 @@ build_keys_response (const struct ResponseFactoryContext *rfc,
* This function checks if the @a denom_pub is already known to us,
* and if not adds it to our set.
*
* @parma cls closure, a `struct ResponseFactoryContext *`
* @param cls closure, a `struct ResponseFactoryContext *`
* @param denom_pub public key of the denomination
* @param issue detailed information about the denomination (value, expiration times, fees)
*/
@ -1899,6 +1898,7 @@ TEH_KS_release_ (const char *location,
* For every call to #TEH_KS_acquire(), a matching call
* to #TEH_KS_release() must be made.
*
* @param now for what timestamp should we acquire the key state
* @param location name of the function in which the lock is acquired
* @return the key state, NULL on error (usually pretty fatal)
*/
@ -1964,8 +1964,8 @@ TEH_KS_acquire_ (struct GNUNET_TIME_Absolute now,
* @param key_state state to look in
* @param denom_pub_hash hash of denomination public key
* @param use purpose for which the key is being located
* @param ec[out] set to the error code, in case the operation failed
* @param hc[out] set to the HTTP status code to use
* @param[out] ec set to the error code, in case the operation failed
* @param[out] hc set to the HTTP status code to use
* @return the denomination key issue,
* or NULL if denom_pub could not be found (or is not valid at this time for the given @a use)
*/

View File

@ -42,6 +42,7 @@ struct TEH_KS_StateHandle;
* For every call to #TEH_KS_acquire(), a matching call
* to #TEH_KS_release() must be made.
*
* @param now for what timestamp should we acquire the key state
* @param location name of the function in which the lock is acquired
* @return the key state, NULL on error (usually pretty fatal)
*/

View File

@ -21,8 +21,8 @@
* @brief Helper routines shared by libtalerexchange and libtalerauditor
* @author Christian Grothoff
*/
#ifndef TEAH_COMMON_H
#define TEAH_COMMON_H
#ifndef TALER_CURL_LIB_H
#define TALER_CURL_LIB_H
#include <gnunet/gnunet_curl_lib.h>
#include "taler_json_lib.h"
@ -33,10 +33,10 @@
#define COMPRESS_BODIES 1
/**
* State used for #TEAL_curl_easy_post() and
* #TEAL_curl_easy_post_finished().
* State used for #TALER_curl_easy_post() and
* #TALER_curl_easy_post_finished().
*/
struct TEAH_PostContext
struct TALER_CURL_PostContext
{
/**
* JSON encoding of the request to POST.
@ -60,7 +60,7 @@ struct TEAH_PostContext
* @return #GNUNET_OK on success #GNUNET_SYSERR on failure
*/
int
TALER_curl_easy_post (struct TEAH_PostContext *ctx,
TALER_curl_easy_post (struct TALER_CURL_PostContext *ctx,
CURL *eh,
const json_t *body);
@ -71,7 +71,7 @@ TALER_curl_easy_post (struct TEAH_PostContext *ctx,
* @param ctx[in] a request context (updated)
*/
void
TALER_curl_easy_post_finished (struct TEAH_PostContext *ctx);
TALER_curl_easy_post_finished (struct TALER_CURL_PostContext *ctx);
#endif

View File

@ -52,7 +52,7 @@ struct TALER_AUDITOR_DepositConfirmationHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -63,7 +63,7 @@ struct TALER_EXCHANGE_DepositHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -52,7 +52,7 @@ struct TALER_EXCHANGE_PaybackHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Denomination key of the coin.

View File

@ -843,7 +843,7 @@ struct TALER_EXCHANGE_RefreshMeltHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.
@ -1301,7 +1301,7 @@ struct TALER_EXCHANGE_RefreshRevealHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -52,7 +52,7 @@ struct TALER_EXCHANGE_RefundHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -737,7 +737,7 @@ struct TALER_EXCHANGE_ReserveWithdrawHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -52,7 +52,7 @@ struct TALER_EXCHANGE_TrackTransactionHandle
* Context for #TEH_curl_easy_post(). Keeps the data that must
* persist for Curl to make the upload.
*/
struct TEAH_PostContext ctx;
struct TALER_CURL_PostContext ctx;
/**
* Handle for the request.

View File

@ -18,7 +18,7 @@
*/
/**
* @file lib/testing_auditor_api_cmd_exec_wire-auditor.c
* @file lib/testing_api_cmd_auditor_exec_wire_auditor.c
* @brief run the taler-wire-auditor command
* @author Marcello Stanisci
* @author Christian Grothoff

View File

@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>
*/
/**
* @file lib/testing_api_cmd_admin_add_incoming.c
* @file lib/testing_api_cmd_bank_admin_add_incoming.c
* @brief implementation of a bank /admin/add-incoming command
* @author Christian Grothoff
* @author Marcello Stanisci

View File

@ -17,8 +17,8 @@
<http://www.gnu.org/licenses/>
*/
/**
* @file lib/testing_api_cmd_history.c
* @brief command to check the /history API from the bank.
* @file lib/testing_api_cmd_bank_history_credit.c
* @brief command to check the /history/incoming API from the bank.
* @author Marcello Stanisci
*/
#include "platform.h"
@ -282,7 +282,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
TALER_TESTING_UT_EXCHANGE_BANK_ACCOUNT_URL,
&exchange_credit_url)) )
continue; /* not an interesting event */
/* Seek "/history" starting row. */
/* Seek "/history/incoming" starting row. */
if ( (NULL != row_id_start) &&
(*row_id_start == *row_id) &&
(GNUNET_NO == ok) )
@ -332,7 +332,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
/**
* Check that the "/history" response matches the
* Check that the "/history/incoming" response matches the
* CMD whose offset in the list of CMDs is @a off.
*
* @param is the interpreter state.
@ -450,7 +450,7 @@ history_cb (void *cls,
{
hs->hh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unwanted response code from /history: %u\n",
"Unwanted response code from /history/incoming: %u\n",
http_status);
TALER_TESTING_interpreter_fail (is);
return GNUNET_SYSERR;
@ -549,7 +549,7 @@ history_cleanup (void *cls,
(void) cmd;
if (NULL != hs->hh)
{
TALER_LOG_WARNING ("/history did not complete\n");
TALER_LOG_WARNING ("/history/incoming did not complete\n");
TALER_BANK_credit_history_cancel (hs->hh);
}
GNUNET_free (hs->account_url);

View File

@ -18,7 +18,7 @@
*/
/**
* @file lib/testing_api_cmd_bank_history_debit.c
* @brief command to check the /history API from the bank.
* @brief command to check the /history/outgoing API from the bank.
* @author Marcello Stanisci
*/
#include "platform.h"
@ -288,7 +288,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
TALER_TESTING_UT_EXCHANGE_BASE_URL,
&exchange_base_url)) )
continue; /* not an event we care about */
/* Seek "/history" starting row. */
/* Seek "/history/outgoing" starting row. */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Command %s is relevant for debit history!\n",
cmd->label);
@ -340,7 +340,7 @@ build_history (struct TALER_TESTING_Interpreter *is,
/**
* Check that the "/history" response matches the
* Check that the "/history/outgoing" response matches the
* CMD whose offset in the list of CMDs is @a off.
*
* @param is the interpreter state.
@ -451,7 +451,7 @@ history_cb (void *cls,
{
hs->hh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unwanted response code from /history: %u\n",
"Unwanted response code from /history/outgoing: %u\n",
http_status);
TALER_TESTING_interpreter_fail (is);
return GNUNET_SYSERR;
@ -549,7 +549,7 @@ history_cleanup (void *cls,
(void) cmd;
if (NULL != hs->hh)
{
TALER_LOG_WARNING ("/history did not complete\n");
TALER_LOG_WARNING ("/history/outgoing did not complete\n");
TALER_BANK_debit_history_cancel (hs->hh);
}
for (unsigned int off = 0; off<hs->total; off++)

View File

@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>
*/
/**
* @file lib/testing_api_cmd_transfer.c
* @file lib/testing_api_cmd_bank_transfer.c
* @brief implementation of a bank /transfer command
* @author Christian Grothoff
* @author Marcello Stanisci

View File

@ -14,7 +14,7 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* @file mhd_legal.h
* @file mhd_legal.c
* @brief API for returning legal documents based on client language
* and content type preferences
* @author Christian Grothoff