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

View File

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

View File

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

View File

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

View File

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

View File

@ -128,7 +128,6 @@ typedef void
* to the operators of the bank. * to the operators of the bank.
* *
* @param ctx curl context for the event loop * @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 auth authentication data to send to the bank
* @param reserve_pub wire transfer subject for the transfer * @param reserve_pub wire transfer subject for the transfer
* @param amount amount that was deposited * @param amount amount that was deposited
@ -141,7 +140,6 @@ typedef void
*/ */
struct TALER_BANK_AdminAddIncomingHandle * struct TALER_BANK_AdminAddIncomingHandle *
TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx, TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
const char *account_base_url,
const struct TALER_BANK_AuthenticationData *auth, const struct TALER_BANK_AuthenticationData *auth,
const struct const struct
TALER_ReservePublicKeyP *reserve_pub, 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 * @param buf_size[out] set to number of bytes in @a buf, 0 on error
*/ */
void 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 struct TALER_Amount *amount,
const char *exchange_base_url, const char *exchange_base_url,
const struct const struct
@ -212,7 +210,6 @@ typedef void
* Execute a wire transfer. * Execute a wire transfer.
* *
* @param ctx context for HTTP interaction * @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 buffer with the prepared execution details
* @param buf_size number of bytes in @a buf * @param buf_size number of bytes in @a buf
* @param cc function to call upon success * @param cc function to call upon success
@ -221,7 +218,6 @@ typedef void
*/ */
struct TALER_BANK_WireExecuteHandle * struct TALER_BANK_WireExecuteHandle *
TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx, TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
const char *bank_base_url,
const struct const struct
TALER_BANK_AuthenticationData *auth, TALER_BANK_AuthenticationData *auth,
const void *buf, const void *buf,

View File

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

View File

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