diff options
| -rw-r--r-- | src/auditor/taler-auditor.c | 4 | ||||
| -rw-r--r-- | src/bank-lib/fakebank.c | 2 | ||||
| -rw-r--r-- | src/bank-lib/taler-bank-transfer.c | 15 | ||||
| -rw-r--r-- | src/exchange/taler-exchange-aggregator.c | 4 | ||||
| -rw-r--r-- | src/mhd/mhd_responses.c | 18 | 
5 files changed, 24 insertions, 19 deletions
| diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c index 4ba26800..5a943b8a 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, ¤cy_round_unit); +      GNUNET_assert (GNUNET_OK == +                     TALER_amount_get_zero (currency, +                                            ¤cy_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 ddf0633f..0de31fc7 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 692705e3..9cfe2a4a 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 0c6b6a9d..5912388f 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, ¤cy_round_unit); +      GNUNET_assert (GNUNET_OK == +                     TALER_amount_get_zero (exchange_currency_string, +                                            ¤cy_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 aeb3b0b6..6e518148 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;  } | 
