summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-dbinit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-21 19:25:53 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-21 19:25:53 +0100
commitf1d3364313e41eb82165e758717ed86b5b8261fb (patch)
treeb1e99fe11d9790c80dbf4c6ae1e8c9e9ac59fff2 /src/auditor/taler-auditor-dbinit.c
parentca943e8c3fcc8eeebabb1dd6a0c4571652c38870 (diff)
downloadexchange-f1d3364313e41eb82165e758717ed86b5b8261fb.tar.gz
exchange-f1d3364313e41eb82165e758717ed86b5b8261fb.tar.bz2
exchange-f1d3364313e41eb82165e758717ed86b5b8261fb.zip
code cleanup, deduplication, DCE
Diffstat (limited to 'src/auditor/taler-auditor-dbinit.c')
-rw-r--r--src/auditor/taler-auditor-dbinit.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/auditor/taler-auditor-dbinit.c b/src/auditor/taler-auditor-dbinit.c
index bbf3b14b6..99ef96f8d 100644
--- a/src/auditor/taler-auditor-dbinit.c
+++ b/src/auditor/taler-auditor-dbinit.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015 Taler Systems SA
+ Copyright (C) 2014, 2015, 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
@@ -44,6 +44,7 @@ static int reset_db;
*/
static int gc_db;
+
/**
* Main function that will be run.
*
@@ -73,13 +74,19 @@ run (void *cls,
}
if (reset_db)
{
- (void) plugin->drop_tables (plugin->cls,
- GNUNET_YES);
+ if (GNUNET_OK !=
+ plugin->drop_tables (plugin->cls,
+ GNUNET_YES))
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failed to reset database\n");
}
else if (restart_db)
{
- (void) plugin->drop_tables (plugin->cls,
- GNUNET_NO);
+ if (GNUNET_OK !=
+ plugin->drop_tables (plugin->cls,
+ GNUNET_NO))
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failed to restart audits\n");
}
if (GNUNET_OK !=
plugin->create_tables (plugin->cls))
@@ -102,7 +109,7 @@ run (void *cls,
/**
* The main function of the database initialization tool.
- * Used to initialize the Taler Exchange's database.
+ * Used to initialize the Taler auditor's database.
*
* @param argc number of arguments from the command line
* @param argv command line arguments