[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: fix return value in auditor logi
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: fix return value in auditor logic, and check it as well; adding FIXME to mark improperly handled case |
Date: |
Sun, 23 Feb 2020 19:55:23 +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 65434a0e fix return value in auditor logic, and check it as well;
adding FIXME to mark improperly handled case
65434a0e is described below
commit 65434a0e006c45b609c4a724aa192a0d08546cd0
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Feb 23 19:55:21 2020 +0100
fix return value in auditor logic, and check it as well; adding FIXME to
mark improperly handled case
---
src/auditor/taler-auditor.c | 49 ++++++++++++++++++++++++++++++++-------------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 0ec5e2d7..0786ec0e 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -2572,14 +2572,14 @@ wire_transfer_information_cb (void *cls,
&issue);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
GNUNET_CRYPTO_rsa_signature_free (coin.denom_sig.rsa_signature);
edb->free_coin_transaction_list (edb->cls,
tl);
wcc->qs = qs;
- report_row_inconsistency ("aggregation",
- rowid,
- "could not find denomination key for coin
claimed in aggregation");
+ if (0 == qs)
+ report_row_inconsistency ("aggregation",
+ rowid,
+ "could not find denomination key for coin
claimed in aggregation");
return;
}
if (GNUNET_OK !=
@@ -2933,6 +2933,7 @@ check_wire_out_cb (void *cls,
&final_amount))
{
GNUNET_break (0);
+ // FIXME: we should report an arithmetic error here!
ac->qs = GNUNET_DB_STATUS_HARD_ERROR;
return GNUNET_SYSERR;
}
@@ -3068,6 +3069,11 @@ analyze_aggregations (void *cls)
wfi);
GNUNET_free (wfi);
}
+ if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ {
+ /* there were no wire out entries to be looked at, we are done */
+ return qs;
+ }
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != ac.qs)
{
GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == ac.qs);
@@ -5132,14 +5138,25 @@ transact (Analysis analysis,
else
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Processing failed, rolling back transaction\n");
+ "Processing failed (or no changes), rolling back
transaction\n");
adb->rollback (adb->cls,
asession);
edb->rollback (edb->cls,
esession);
}
clear_transaction_state_cache ();
- return qs;
+ switch (qs)
+ {
+ case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
+ return GNUNET_OK;
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ return GNUNET_OK;
+ case GNUNET_DB_STATUS_SOFT_ERROR:
+ return GNUNET_NO;
+ case GNUNET_DB_STATUS_HARD_ERROR:
+ return GNUNET_SYSERR;
+ }
+ return GNUNET_OK;
}
@@ -5166,14 +5183,18 @@ setup_sessions_and_run ()
return;
}
- transact (&analyze_reserves,
- NULL);
- transact (&analyze_aggregations,
- NULL);
- transact (&analyze_coins,
- NULL);
- transact (&analyze_deposit_confirmations,
- NULL);
+ GNUNET_break (GNUNET_SYSERR !=
+ transact (&analyze_reserves,
+ NULL));
+ GNUNET_break (GNUNET_SYSERR !=
+ transact (&analyze_aggregations,
+ NULL));
+ GNUNET_break (GNUNET_SYSERR !=
+ transact (&analyze_coins,
+ NULL));
+ GNUNET_break (GNUNET_SYSERR !=
+ transact (&analyze_deposit_confirmations,
+ NULL));
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: fix return value in auditor logic, and check it as well; adding FIXME to mark improperly handled case,
gnunet <=