summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-17 15:13:27 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-17 15:14:07 +0100
commit1759b63b2f0df1b794ed73f614b60493977d3e74 (patch)
tree8734472a9c1780ef3d0dce8a7d9659a230fe9264 /src
parentc8e51de96f5a7dd767e49e9940e515b5a5aef83a (diff)
downloadexchange-1759b63b2f0df1b794ed73f614b60493977d3e74.tar.gz
exchange-1759b63b2f0df1b794ed73f614b60493977d3e74.tar.bz2
exchange-1759b63b2f0df1b794ed73f614b60493977d3e74.zip
abort wire audit if bank fails to return histories
Diffstat (limited to 'src')
-rw-r--r--src/auditor/taler-wire-auditor.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/auditor/taler-wire-auditor.c b/src/auditor/taler-wire-auditor.c
index 7a44417dd..fff0e95b7 100644
--- a/src/auditor/taler-wire-auditor.c
+++ b/src/auditor/taler-wire-auditor.c
@@ -1358,14 +1358,19 @@ history_debit_cb (void *cls,
if (NULL == details)
{
+ wa->dhh = NULL;
if (TALER_EC_NONE != ec)
{
- /* FIXME: log properly to audit report! */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Error fetching history: %u!\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Error fetching debit history of account %s: %u/%u!\n",
+ wa->section_name,
+ http_status_code,
(unsigned int) ec);
+ commit (GNUNET_DB_STATUS_HARD_ERROR);
+ global_ret = 1;
+ GNUNET_SCHEDULER_shutdown ();
+ return GNUNET_SYSERR;
}
- wa->dhh = NULL;
check_exchange_wire_out (wa);
return GNUNET_OK;
}
@@ -1629,15 +1634,20 @@ history_credit_cb (void *cls,
if (NULL == details)
{
+ wa->chh = NULL;
if (TALER_EC_NONE != ec)
{
- /* FIXME: log properly to audit report! */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Error fetching history: %u!\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Error fetching credit history of account %s: %u/%u!\n",
+ wa->section_name,
+ http_status,
(unsigned int) ec);
+ commit (GNUNET_DB_STATUS_HARD_ERROR);
+ global_ret = 1;
+ GNUNET_SCHEDULER_shutdown ();
+ return GNUNET_SYSERR;
}
/* end of operation */
- wa->chh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Reconciling CREDIT processing of account `%s'\n",
wa->section_name);