summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-18 20:50:25 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-18 20:50:25 +0100
commit6fc2a5f9493e614a458cfc57ad42c782d06ba07a (patch)
tree14dcd68aa3bbf9f226d7b1e121c04d2019cd8675
parentc1996b7e69d7cb51adbd687b3a1cffdc02e28d3c (diff)
downloadexchange-6fc2a5f9493e614a458cfc57ad42c782d06ba07a.tar.gz
exchange-6fc2a5f9493e614a458cfc57ad42c782d06ba07a.tar.bz2
exchange-6fc2a5f9493e614a458cfc57ad42c782d06ba07a.zip
fixes
-rw-r--r--src/auditor/taler-auditor.c4
-rw-r--r--src/bank-lib/fakebank.c2
-rw-r--r--src/bank-lib/taler-bank-transfer.c15
-rw-r--r--src/exchange/taler-exchange-aggregator.c4
-rw-r--r--src/mhd/mhd_responses.c18
5 files changed, 24 insertions, 19 deletions
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 4ba26800b..5a943b8ae 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -5245,7 +5245,9 @@ run (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n");
- TALER_amount_get_zero (currency, &currency_round_unit);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (currency,
+ &currency_round_unit));
currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100;
}
else if (GNUNET_OK !=
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index ddf0633fd..0de31fc7e 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -933,7 +933,7 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
if (0 > ha.delta)
pos = pos->prev;
else
- pos = pos->prev;
+ pos = pos->tail;
}
else
{
diff --git a/src/bank-lib/taler-bank-transfer.c b/src/bank-lib/taler-bank-transfer.c
index 692705e32..9cfe2a4ae 100644
--- a/src/bank-lib/taler-bank-transfer.c
+++ b/src/bank-lib/taler-bank-transfer.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2017 GNUnet e.V.
+ Copyright (C) 2017-2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -25,11 +25,6 @@
#include "taler_bank_service.h"
/**
- * Account base URL.
- */
-static char *account_base_url;
-
-/**
* Amount to transfer.
*/
static struct TALER_Amount amount;
@@ -203,7 +198,7 @@ run (void *cls,
/**
- * The main function of the reservemod tool
+ * The main function of the taler-bank-transfer tool
*
* @param argc number of arguments from the command line
* @param argv command line arguments
@@ -223,8 +218,8 @@ main (int argc, char *const *argv)
(GNUNET_GETOPT_option_string ('b',
"bank",
"URL",
- "base URL of the account at the bank",
- &account_base_url)),
+ "Wire gateway URL to use to talk to the bank",
+ &auth.wire_gateway_url)),
GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
GNUNET_GETOPT_option_mandatory
(GNUNET_GETOPT_option_string ('C',
@@ -261,7 +256,7 @@ main (int argc, char *const *argv)
if (GNUNET_OK !=
GNUNET_PROGRAM_run (argc, argv,
"taler-bank-transfer",
- "Execute bank transfer",
+ "Execute bank transfer to the exchange",
options,
&run, NULL))
return 1;
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 0c6b6a9d7..5912388fe 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -605,7 +605,9 @@ exchange_serve_process_config ()
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n");
- TALER_amount_get_zero (exchange_currency_string, &currency_round_unit);
+ GNUNET_assert (GNUNET_OK ==
+ TALER_amount_get_zero (exchange_currency_string,
+ &currency_round_unit));
currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100;
}
else if (GNUNET_OK !=
diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c
index aeb3b0b69..6e5181482 100644
--- a/src/mhd/mhd_responses.c
+++ b/src/mhd/mhd_responses.c
@@ -278,20 +278,26 @@ int
TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
{
struct MHD_Response *resp;
+ int ret;
- GNUNET_assert (NULL != (resp = MHD_create_response_from_buffer (0, NULL,
- MHD_RESPMEM_PERSISTENT)));
+ resp = MHD_create_response_from_buffer (0,
+ NULL,
+ MHD_RESPMEM_PERSISTENT);
+ if (NULL == resp)
+ return MHD_NO;
/* This adds the Access-Control-Allow-Origin header.
* All endpoints of the exchange allow CORS. */
TALER_MHD_add_global_headers (resp);
GNUNET_break (MHD_YES ==
MHD_add_response_header (resp,
- // Not available as MHD constant yet
+ /* Not available as MHD constant yet */
"Access-Control-Allow-Headers",
"*"));
- GNUNET_assert (MHD_YES == MHD_queue_response (connection, MHD_HTTP_NO_CONTENT,
- resp));
- return MHD_YES;
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_NO_CONTENT,
+ resp);
+ MHD_destroy_response (resp);
+ return ret;
}