[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] 01/02: fix use of uninit value on PAYBACK
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] 01/02: fix use of uninit value on PAYBACK path in auditor |
Date: |
Sun, 16 Apr 2017 02:39:15 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit be6dde89dbc6e9a9c69a8cec600f46e02c6c387c
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Apr 16 02:16:41 2017 +0200
fix use of uninit value on PAYBACK path in auditor
---
src/auditor/taler-auditor.c | 44 +++++++++++++++++++++++++++++++++-----------
1 file changed, 33 insertions(+), 11 deletions(-)
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index c4fb025..b94b1e8 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -1531,6 +1531,17 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
return GNUNET_SYSERR;
}
}
+ /* Check that the fees given in the transaction list and in dki match */
+ TALER_amount_ntoh (&tmp,
+ fee_dki);
+ if (0 !=
+ TALER_amount_cmp (&tmp,
+ fee))
+ {
+ /* Disagreement in fee structure within DB, should be impossible! */
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
break;
case TALER_EXCHANGEDB_TT_REFRESH_MELT:
amount_with_fee = &tl->details.melt->amount_with_fee;
@@ -1544,6 +1555,17 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
GNUNET_break (0);
return GNUNET_SYSERR;
}
+ /* Check that the fees given in the transaction list and in dki match */
+ TALER_amount_ntoh (&tmp,
+ fee_dki);
+ if (0 !=
+ TALER_amount_cmp (&tmp,
+ fee))
+ {
+ /* Disagreement in fee structure within DB, should be impossible! */
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
break;
case TALER_EXCHANGEDB_TT_REFUND:
amount_with_fee = &tl->details.refund->refund_amount;
@@ -1594,6 +1616,17 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
return GNUNET_SYSERR;
}
}
+ /* Check that the fees given in the transaction list and in dki match */
+ TALER_amount_ntoh (&tmp,
+ fee_dki);
+ if (0 !=
+ TALER_amount_cmp (&tmp,
+ fee))
+ {
+ /* Disagreement in fee structure within DB, should be impossible! */
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
break;
case TALER_EXCHANGEDB_TT_PAYBACK:
amount_with_fee = &tl->details.payback->value;
@@ -1608,17 +1641,6 @@ check_transaction_history (const struct
TALER_CoinSpendPublicKeyP *coin_pub,
break;
}
- /* Check that the fees given in the transaction list and in dki match */
- TALER_amount_ntoh (&tmp,
- fee_dki);
- if (0 !=
- TALER_amount_cmp (&tmp,
- fee))
- {
- /* Disagreement in fee structure within DB, should be impossible! */
- GNUNET_break (0);
- return GNUNET_SYSERR;
- }
} /* for 'tl' */
/* Calculate total balance change, i.e. expenditures minus refunds */
--
To stop receiving notification emails like this one, please contact
address@hidden