diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-07 17:50:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-07 17:50:53 +0200 |
commit | 8a60e6b62f173c1148686572e72ad552c3808325 (patch) | |
tree | 25db5bba3c0fe4df518d1bc601aeea28ecc458dc /src/bank-lib/taler-exchange-wire-gateway-client.c | |
parent | 26e061c2128666fcbdfb94d92343ec12599a59a1 (diff) | |
download | exchange-8a60e6b62f173c1148686572e72ad552c3808325.tar.xz |
-fix fakebank/tewgc logic and add test case
Diffstat (limited to 'src/bank-lib/taler-exchange-wire-gateway-client.c')
-rw-r--r-- | src/bank-lib/taler-exchange-wire-gateway-client.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bank-lib/taler-exchange-wire-gateway-client.c b/src/bank-lib/taler-exchange-wire-gateway-client.c index 6d91d51bd..436d416d5 100644 --- a/src/bank-lib/taler-exchange-wire-gateway-client.c +++ b/src/bank-lib/taler-exchange-wire-gateway-client.c @@ -64,7 +64,7 @@ static char *account_section; /** * Starting row. */ -static unsigned long long start_row; +static unsigned long long start_row = UINT64_MAX; /** * Authentication data. @@ -165,7 +165,7 @@ do_shutdown (void *cls) * @return #GNUNET_OK to continue, #GNUNET_SYSERR to * abort iteration */ -static int +static enum GNUNET_GenericReturnValue credit_history_cb (void *cls, unsigned int http_status, enum TALER_ErrorCode ec, @@ -279,7 +279,7 @@ execute_credit_history (void) * @param json detailed response from the HTTPD, or NULL if reply was not in JSON * @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration */ -static int +static enum GNUNET_GenericReturnValue debit_history_cb (void *cls, unsigned int http_status, enum TALER_ErrorCode ec, @@ -435,7 +435,7 @@ execute_wire_transfer (void) return; } - // See if subject was given as a payto-parameter. + /* See if subject was given as a payto-parameter. */ if (NULL == subject) subject = TALER_payto_get_subject (credit_account); if (NULL != subject) @@ -448,10 +448,9 @@ execute_wire_transfer (void) { fprintf (stderr, "Error: wire transfer subject must be a WTID\n"); + GNUNET_SCHEDULER_shutdown (); return; } - GNUNET_SCHEDULER_shutdown (); - return; } else { @@ -563,7 +562,7 @@ execute_admin_transfer (void) &auth, &reserve_pub, &amount, - credit_account, + debit_account, &res_cb, NULL); if (NULL == op) |