create tables in taler-auditor-sign instead of failing obscurely

This commit is contained in:
Christian Grothoff 2017-09-13 14:29:07 +02:00
parent b46735fbaf
commit 7123015dbc
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -196,8 +196,9 @@ main (int argc,
argc, argv) < 0)
return 1;
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_SYSERR == GNUNET_CONFIGURATION_load (cfg,
cfgfile))
if (GNUNET_SYSERR ==
GNUNET_CONFIGURATION_load (cfg,
cfgfile))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Malformed configuration file `%s', exit ...\n"),
@ -355,6 +356,21 @@ main (int argc,
GNUNET_free (eddsa_priv);
return 1;
}
/* Create required tables */
if (GNUNET_OK !=
adb->create_tables (adb->cls))
{
fprintf (stderr,
"Failed to create tables in auditor's database\n");
TALER_AUDITORDB_plugin_unload (adb);
GNUNET_free (dks);
GNUNET_free (sigs);
GNUNET_free (eddsa_priv);
return 3;
}
/* Update DB */
{
enum GNUNET_DB_QueryStatus qs;