fixes
This commit is contained in:
parent
c1996b7e69
commit
6fc2a5f949
@ -5245,7 +5245,9 @@ run (void *cls,
|
|||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n");
|
"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;
|
currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100;
|
||||||
}
|
}
|
||||||
else if (GNUNET_OK !=
|
else if (GNUNET_OK !=
|
||||||
|
@ -933,7 +933,7 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h,
|
|||||||
if (0 > ha.delta)
|
if (0 > ha.delta)
|
||||||
pos = pos->prev;
|
pos = pos->prev;
|
||||||
else
|
else
|
||||||
pos = pos->prev;
|
pos = pos->tail;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
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
|
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
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@ -24,11 +24,6 @@
|
|||||||
#include <jansson.h>
|
#include <jansson.h>
|
||||||
#include "taler_bank_service.h"
|
#include "taler_bank_service.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* Account base URL.
|
|
||||||
*/
|
|
||||||
static char *account_base_url;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount to transfer.
|
* Amount to transfer.
|
||||||
*/
|
*/
|
||||||
@ -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 argc number of arguments from the command line
|
||||||
* @param argv command line arguments
|
* @param argv command line arguments
|
||||||
@ -223,8 +218,8 @@ main (int argc, char *const *argv)
|
|||||||
(GNUNET_GETOPT_option_string ('b',
|
(GNUNET_GETOPT_option_string ('b',
|
||||||
"bank",
|
"bank",
|
||||||
"URL",
|
"URL",
|
||||||
"base URL of the account at the bank",
|
"Wire gateway URL to use to talk to the bank",
|
||||||
&account_base_url)),
|
&auth.wire_gateway_url)),
|
||||||
GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
|
GNUNET_GETOPT_option_help ("Deposit funds into a Taler reserve"),
|
||||||
GNUNET_GETOPT_option_mandatory
|
GNUNET_GETOPT_option_mandatory
|
||||||
(GNUNET_GETOPT_option_string ('C',
|
(GNUNET_GETOPT_option_string ('C',
|
||||||
@ -261,7 +256,7 @@ main (int argc, char *const *argv)
|
|||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_PROGRAM_run (argc, argv,
|
GNUNET_PROGRAM_run (argc, argv,
|
||||||
"taler-bank-transfer",
|
"taler-bank-transfer",
|
||||||
"Execute bank transfer",
|
"Execute bank transfer to the exchange",
|
||||||
options,
|
options,
|
||||||
&run, NULL))
|
&run, NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -605,7 +605,9 @@ exchange_serve_process_config ()
|
|||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
|
||||||
"No [taler]/CURRENCY_ROUND_UNIT specified, defaulting to '0.01'.\n");
|
"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;
|
currency_round_unit.fraction = TALER_AMOUNT_FRAC_BASE / 100;
|
||||||
}
|
}
|
||||||
else if (GNUNET_OK !=
|
else if (GNUNET_OK !=
|
||||||
|
@ -278,20 +278,26 @@ int
|
|||||||
TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
|
TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
|
||||||
{
|
{
|
||||||
struct MHD_Response *resp;
|
struct MHD_Response *resp;
|
||||||
|
int ret;
|
||||||
|
|
||||||
GNUNET_assert (NULL != (resp = MHD_create_response_from_buffer (0, NULL,
|
resp = MHD_create_response_from_buffer (0,
|
||||||
MHD_RESPMEM_PERSISTENT)));
|
NULL,
|
||||||
|
MHD_RESPMEM_PERSISTENT);
|
||||||
|
if (NULL == resp)
|
||||||
|
return MHD_NO;
|
||||||
/* This adds the Access-Control-Allow-Origin header.
|
/* This adds the Access-Control-Allow-Origin header.
|
||||||
* All endpoints of the exchange allow CORS. */
|
* All endpoints of the exchange allow CORS. */
|
||||||
TALER_MHD_add_global_headers (resp);
|
TALER_MHD_add_global_headers (resp);
|
||||||
GNUNET_break (MHD_YES ==
|
GNUNET_break (MHD_YES ==
|
||||||
MHD_add_response_header (resp,
|
MHD_add_response_header (resp,
|
||||||
// Not available as MHD constant yet
|
/* Not available as MHD constant yet */
|
||||||
"Access-Control-Allow-Headers",
|
"Access-Control-Allow-Headers",
|
||||||
"*"));
|
"*"));
|
||||||
GNUNET_assert (MHD_YES == MHD_queue_response (connection, MHD_HTTP_NO_CONTENT,
|
ret = MHD_queue_response (connection,
|
||||||
resp));
|
MHD_HTTP_NO_CONTENT,
|
||||||
return MHD_YES;
|
resp);
|
||||||
|
MHD_destroy_response (resp);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user