gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: fixes


From: gnunet
Subject: [taler-exchange] branch master updated: fixes
Date: Sat, 18 Jan 2020 20:50:27 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 6fc2a5f9 fixes
6fc2a5f9 is described below

commit 6fc2a5f9493e614a458cfc57ad42c782d06ba07a
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 18 20:50:25 2020 +0100

    fixes
---
 src/auditor/taler-auditor.c              |  4 +++-
 src/bank-lib/fakebank.c                  |  2 +-
 src/bank-lib/taler-bank-transfer.c       | 15 +++++----------
 src/exchange/taler-exchange-aggregator.c |  4 +++-
 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, &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 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
@@ -24,11 +24,6 @@
 #include <jansson.h>
 #include "taler_bank_service.h"
 
-/**
- * Account base URL.
- */
-static char *account_base_url;
-
 /**
  * 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 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, &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 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;
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]