[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: do not use uninitia
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: do not use uninitialized master_pub field from 'struct Exchange', but use the initialized master_pub from keys instead (when storing wire fee data in the database), should complete #4943 implementation |
Date: |
Sun, 23 Jul 2017 14:30:57 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 2d3fcf5 do not use uninitialized master_pub field from 'struct
Exchange', but use the initialized master_pub from keys instead (when storing
wire fee data in the database), should complete #4943 implementation
2d3fcf5 is described below
commit 2d3fcf511582a69f4ee18a671b6cb2fba2dbdff6
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jul 22 16:10:50 2017 +0200
do not use uninitialized master_pub field from 'struct Exchange', but use
the initialized master_pub from keys instead (when storing wire fee data in the
database), should complete #4943 implementation
---
src/backend/taler-merchant-httpd_exchanges.c | 15 +++++++++++++--
src/backend/taler-merchant-httpd_track-transfer.c | 3 ++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_exchanges.c
b/src/backend/taler-merchant-httpd_exchanges.c
index a011be4..c4df9ea 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -312,7 +312,12 @@ process_wire_fees (void *cls,
struct FeesByWireMethod *f;
struct TALER_EXCHANGE_WireAggregateFees *endp;
struct TALER_EXCHANGE_WireAggregateFees *af;
-
+ const struct TALER_EXCHANGE_Keys *keys;
+ const struct TALER_MasterPublicKeyP *master_pub;
+
+ keys = TALER_EXCHANGE_get_keys (exchange->conn);
+ GNUNET_assert (NULL != keys);
+ master_pub = &keys->master_pub;
for (f = exchange->wire_fees_head; NULL != f; f = f->next)
if (0 == strcasecmp (wire_method,
f->wire_method))
@@ -349,8 +354,14 @@ process_wire_fees (void *cls,
GNUNET_CRYPTO_hash (wire_method,
strlen (wire_method) + 1,
&h_wire_method);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Storing wire fee for `%s' and method `%s' at %s in DB; the fee
is %s\n",
+ TALER_B2S (master_pub),
+ wire_method,
+ GNUNET_STRINGS_absolute_time_to_string (af->start_date),
+ TALER_amount2s (&af->wire_fee));
qs = db->store_wire_fee_by_exchange (db->cls,
- &exchange->master_pub,
+ master_pub,
&h_wire_method,
&af->wire_fee,
&af->closing_fee,
diff --git a/src/backend/taler-merchant-httpd_track-transfer.c
b/src/backend/taler-merchant-httpd_track-transfer.c
index 4d55b7a..f66457a 100644
--- a/src/backend/taler-merchant-httpd_track-transfer.c
+++ b/src/backend/taler-merchant-httpd_track-transfer.c
@@ -533,8 +533,9 @@ check_wire_fee (struct TrackTransferContext *rctx,
if (0 >= qs)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Failed to find wire fee for `%s' at %s in DB, accepting
blindly that the fee is %s\n",
+ "Failed to find wire fee for `%s' and method `%s' at %s in DB,
accepting blindly that the fee is %s\n",
TALER_B2S (master_pub),
+ rctx->wire_method,
GNUNET_STRINGS_absolute_time_to_string (execution_time),
TALER_amount2s (wire_fee));
return GNUNET_NO;
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: do not use uninitialized master_pub field from 'struct Exchange', but use the initialized master_pub from keys instead (when storing wire fee data in the database), should complete #4943 implementation,
gnunet <=