dce: redundant args

This commit is contained in:
Florian Dold 2020-01-18 04:31:55 +01:00
parent 0cebe32fc6
commit 5d19229561
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
8 changed files with 12 additions and 24 deletions

View File

@ -161,7 +161,6 @@ handle_admin_add_incoming_finished (void *cls,
* to the operators of the bank.
*
* @param ctx curl context for the event loop
* @param account_base_url URL of the bank (money flows into this account)
* @param auth authentication data to send to the bank
* @param reserve_pub wire transfer subject for the transfer
* @param amount amount that was deposited
@ -174,7 +173,6 @@ handle_admin_add_incoming_finished (void *cls,
*/
struct TALER_BANK_AdminAddIncomingHandle *
TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
const char *account_base_url,
const struct TALER_BANK_AuthenticationData *auth,
const struct
TALER_ReservePublicKeyP *reserve_pub,
@ -202,7 +200,7 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
aai = GNUNET_new (struct TALER_BANK_AdminAddIncomingHandle);
aai->cb = res_cb;
aai->cb_cls = res_cb_cls;
aai->request_url = TALER_url_join (account_base_url,
aai->request_url = TALER_url_join (auth->wire_gateway_url,
"admin/add-incoming",
NULL);
if (NULL == aai->request_url)

View File

@ -68,7 +68,7 @@ GNUNET_NETWORK_STRUCT_END
/**
* Prepare for exeuction of a wire transfer.
*
* @param destination_account_url payto:// URL identifying where to send the money
* @param destination_account_payto_uri payto:// URL identifying where to send the money
* @param amount amount to transfer, already rounded
* @param exchange_base_url base URL of this exchange (included in subject
* to facilitate use of tracking API by merchant backend)
@ -77,7 +77,7 @@ GNUNET_NETWORK_STRUCT_END
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
*/
void
TALER_BANK_prepare_wire_transfer (const char *destination_account_url,
TALER_BANK_prepare_wire_transfer (const char *destination_account_payto_uri,
const struct TALER_Amount *amount,
const char *exchange_base_url,
const struct
@ -86,7 +86,7 @@ TALER_BANK_prepare_wire_transfer (const char *destination_account_url,
size_t *buf_size)
{
struct WirePackP *wp;
size_t d_len = strlen (destination_account_url) + 1;
size_t d_len = strlen (destination_account_payto_uri) + 1;
size_t u_len = strlen (exchange_base_url) + 1;
char *end;
@ -101,7 +101,7 @@ TALER_BANK_prepare_wire_transfer (const char *destination_account_url,
wp->exchange_url_len = htonl ((uint32_t) u_len);
end = (char *) &wp[1];
memcpy (end,
destination_account_url,
destination_account_payto_uri,
d_len);
memcpy (end + d_len,
exchange_base_url,
@ -249,7 +249,6 @@ handle_transfer_finished (void *cls,
*/
struct TALER_BANK_WireExecuteHandle *
TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
const char *bank_base_url,
const struct
TALER_BANK_AuthenticationData *auth,
const void *buf,
@ -263,7 +262,7 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
const struct WirePackP *wp = buf;
uint32_t d_len;
uint32_t u_len;
const char *destination_account_url;
const char *destination_account_uri;
const char *exchange_base_url;
struct TALER_Amount amount;
@ -279,9 +278,9 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
GNUNET_break (0);
return NULL;
}
destination_account_url = (const char *) &wp[1];
exchange_base_url = destination_account_url + d_len;
if (NULL == bank_base_url)
destination_account_uri = (const char *) &wp[1];
exchange_base_url = destination_account_uri + d_len;
if (NULL == auth->wire_gateway_url)
{
GNUNET_break (0);
return NULL;
@ -291,7 +290,7 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
weh = GNUNET_new (struct TALER_BANK_WireExecuteHandle);
weh->cb = cc;
weh->cb_cls = cc_cls;
weh->request_url = TALER_url_join (bank_base_url,
weh->request_url = TALER_url_join (auth->wire_gateway_url,
"transfer",
NULL);
if (NULL == weh->request_url)
@ -306,7 +305,7 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
"amount", TALER_JSON_from_amount (&amount),
"exchange_base_url", exchange_base_url,
"wtid", GNUNET_JSON_from_data_auto (&wp->wtid),
"credit_account", destination_account_url);
"credit_account", destination_account_uri);
if (NULL == transfer_obj)
{
GNUNET_break (0);

View File

@ -189,7 +189,6 @@ run (void *cls,
auth.details.basic.username = username;
auth.details.basic.password = password;
op = TALER_BANK_admin_add_incoming (ctx,
account_base_url,
&auth,
&reserve_pub,
&amount,

View File

@ -209,7 +209,6 @@ execute_wire_transfer ()
&buf,
&buf_size);
eh = TALER_BANK_execute_wire_transfer (ctx,
destination_account_url,
&auth,
buf,
buf_size,

View File

@ -1740,7 +1740,6 @@ wire_prepare_cb (void *cls,
}
wa = wpd->wa;
wpd->eh = TALER_BANK_execute_wire_transfer (ctx,
wa->auth.wire_gateway_url,
&wa->auth,
buf,
buf_size,

View File

@ -128,7 +128,6 @@ typedef void
* to the operators of the bank.
*
* @param ctx curl context for the event loop
* @param account_base_url URL of the bank (money flows into this account)
* @param auth authentication data to send to the bank
* @param reserve_pub wire transfer subject for the transfer
* @param amount amount that was deposited
@ -141,7 +140,6 @@ typedef void
*/
struct TALER_BANK_AdminAddIncomingHandle *
TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
const char *account_base_url,
const struct TALER_BANK_AuthenticationData *auth,
const struct
TALER_ReservePublicKeyP *reserve_pub,
@ -176,7 +174,7 @@ TALER_BANK_admin_add_incoming_cancel (struct
* @param buf_size[out] set to number of bytes in @a buf, 0 on error
*/
void
TALER_BANK_prepare_wire_transfer (const char *destination_account_url,
TALER_BANK_prepare_wire_transfer (const char *destination_account_payto_uri,
const struct TALER_Amount *amount,
const char *exchange_base_url,
const struct
@ -212,7 +210,6 @@ typedef void
* Execute a wire transfer.
*
* @param ctx context for HTTP interaction
* @param bank_base_url URL of the base INCLUDING account number
* @param buf buffer with the prepared execution details
* @param buf_size number of bytes in @a buf
* @param cc function to call upon success
@ -221,7 +218,6 @@ typedef void
*/
struct TALER_BANK_WireExecuteHandle *
TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
const char *bank_base_url,
const struct
TALER_BANK_AuthenticationData *auth,
const void *buf,

View File

@ -334,7 +334,6 @@ admin_add_incoming_run (void *cls,
fts->aih
= TALER_BANK_admin_add_incoming
(TALER_TESTING_interpreter_get_context (is),
fts->exchange_credit_url,
&fts->auth,
&fts->reserve_pub,
&fts->amount,

View File

@ -243,7 +243,6 @@ transfer_run (void *cls,
fts->weh
= TALER_BANK_execute_wire_transfer
(TALER_TESTING_interpreter_get_context (is),
fts->account_debit_url,
&fts->auth,
buf,
buf_size,