diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-18 04:31:55 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-18 04:31:55 +0100 |
commit | 5d192295616528e54c47741b835c3f748c07d3ac (patch) | |
tree | 7182dc50ad14c01d041ada571c0f0091cd40ca05 | |
parent | 0cebe32fc69324e3a656b58a528115b44e88b51c (diff) |
dce: redundant args
-rw-r--r-- | src/bank-lib/bank_api_admin.c | 4 | ||||
-rw-r--r-- | src/bank-lib/bank_api_transfer.c | 21 | ||||
-rw-r--r-- | src/bank-lib/taler-bank-transfer.c | 1 | ||||
-rw-r--r-- | src/exchange-tools/taler-wire.c | 1 | ||||
-rw-r--r-- | src/exchange/taler-exchange-aggregator.c | 1 | ||||
-rw-r--r-- | src/include/taler_bank_service.h | 6 | ||||
-rw-r--r-- | src/lib/testing_api_cmd_bank_admin_add_incoming.c | 1 | ||||
-rw-r--r-- | src/lib/testing_api_cmd_bank_transfer.c | 1 |
8 files changed, 12 insertions, 24 deletions
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index e3c9f6898..979e0b068 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -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) diff --git a/src/bank-lib/bank_api_transfer.c b/src/bank-lib/bank_api_transfer.c index e8138adbf..61f999701 100644 --- a/src/bank-lib/bank_api_transfer.c +++ b/src/bank-lib/bank_api_transfer.c @@ -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); diff --git a/src/bank-lib/taler-bank-transfer.c b/src/bank-lib/taler-bank-transfer.c index c52c4b38d..692705e32 100644 --- a/src/bank-lib/taler-bank-transfer.c +++ b/src/bank-lib/taler-bank-transfer.c @@ -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, diff --git a/src/exchange-tools/taler-wire.c b/src/exchange-tools/taler-wire.c index fbad2e9ad..cdfdb1428 100644 --- a/src/exchange-tools/taler-wire.c +++ b/src/exchange-tools/taler-wire.c @@ -209,7 +209,6 @@ execute_wire_transfer () &buf, &buf_size); eh = TALER_BANK_execute_wire_transfer (ctx, - destination_account_url, &auth, buf, buf_size, diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c index d0bb715cd..aa3c3e44c 100644 --- a/src/exchange/taler-exchange-aggregator.c +++ b/src/exchange/taler-exchange-aggregator.c @@ -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, diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h index a0b36b1e0..8efc1a79b 100644 --- a/src/include/taler_bank_service.h +++ b/src/include/taler_bank_service.h @@ -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, diff --git a/src/lib/testing_api_cmd_bank_admin_add_incoming.c b/src/lib/testing_api_cmd_bank_admin_add_incoming.c index fa3db3426..e9f15f634 100644 --- a/src/lib/testing_api_cmd_bank_admin_add_incoming.c +++ b/src/lib/testing_api_cmd_bank_admin_add_incoming.c @@ -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, diff --git a/src/lib/testing_api_cmd_bank_transfer.c b/src/lib/testing_api_cmd_bank_transfer.c index 919946f6e..5290ba684 100644 --- a/src/lib/testing_api_cmd_bank_transfer.c +++ b/src/lib/testing_api_cmd_bank_transfer.c @@ -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, |