use proper default configuration

This commit is contained in:
Christian Grothoff 2019-06-30 17:44:58 +02:00
parent 0ade45d315
commit e9f43adb5b
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 33 additions and 28 deletions

View File

@ -74,10 +74,10 @@ main (int argc,
"public key of the exchange (Crockford base32 encoded)",
&master_public_key)),
GNUNET_GETOPT_option_string ('u',
"exchange-url",
"URL",
"base URL of the exchange",
&exchange_url),
"exchange-url",
"URL",
"base URL of the exchange",
&exchange_url),
GNUNET_GETOPT_option_flag ('r',
"remove",
"remove the exchange's key (default is to add)",
@ -95,6 +95,8 @@ main (int argc,
options,
argc, argv) <= 0)
return 1;
if (NULL == cfgfile)
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
cfg = GNUNET_CONFIGURATION_create ();
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@ -166,7 +168,7 @@ main (int argc,
if (NULL == session)
{
fprintf (stderr,
"Failed to initialize database session\n");
"Failed to initialize database session\n");
TALER_AUDITORDB_plugin_unload (adb);
return 3;
}
@ -195,8 +197,7 @@ main (int argc,
if (0 == qs)
{
fprintf (stderr,
"Did not update auditor DB: value existed\n",
qs);
"Did not update auditor DB: value existed\n");
TALER_AUDITORDB_plugin_unload (adb);
return 4;
}

View File

@ -195,6 +195,8 @@ main (int argc,
options,
argc, argv) <= 0)
return 1;
if (NULL == cfgfile)
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_SYSERR ==
GNUNET_CONFIGURATION_load (cfg,

View File

@ -479,34 +479,34 @@ postgres_prepare (PGconn *db_conn)
0),
/* used in #postgres_insert_exchange */
GNUNET_PQ_make_prepare ("auditor_insert_exchange",
"INSERT INTO auditor_exchanges "
"(master_pub"
",exchange_url"
") VALUES ($1,$2);",
"INSERT INTO auditor_exchanges "
"(master_pub"
",exchange_url"
") VALUES ($1,$2);",
2),
/* used in #postgres_delete_exchange */
GNUNET_PQ_make_prepare ("auditor_delete_exchange",
"DELETE"
" FROM auditor_exchanges"
" WHERE master_pub=$1;",
"DELETE"
" FROM auditor_exchanges"
" WHERE master_pub=$1;",
1),
/* used in #postgres_list_exchanges */
GNUNET_PQ_make_prepare ("auditor_list_exchanges",
"SELECT"
" master_pub"
"SELECT"
" master_pub"
",exchange_url"
" FROM auditor_exchanges",
" FROM auditor_exchanges",
0),
/* used in #postgres_insert_exchange_signkey */
GNUNET_PQ_make_prepare ("auditor_insert_exchange_signkey",
"INSERT INTO auditor_exchange_signkeys "
"(master_pub"
",ep_start"
",ep_expire"
",ep_end"
",exchange_pub"
"INSERT INTO auditor_exchange_signkeys "
"(master_pub"
",ep_start"
",ep_expire"
",ep_end"
",exchange_pub"
",master_sig"
") VALUES ($1,$2,$3,$4,$5,$6);",
") VALUES ($1,$2,$3,$4,$5,$6);",
6),
/* Used in #postgres_insert_denomination_info() */
GNUNET_PQ_make_prepare ("auditor_denominations_insert",
@ -1215,8 +1215,8 @@ postgres_gc (void *cls)
}
/* FIXME: this is obviously not going to be this easy... */
qs = GNUNET_PQ_eval_prepared_non_select (conn,
"gc_auditor",
params_time);
"gc_auditor",
params_time);
if (0 > qs)
{
GNUNET_break (0);
@ -1250,8 +1250,8 @@ postgres_insert_exchange (void *cls,
};
return GNUNET_PQ_eval_prepared_non_select (session->conn,
"auditor_insert_exchange",
params);
"auditor_insert_exchange",
params);
}

View File

@ -787,6 +787,8 @@ main (int argc,
TALER_LOG_ERROR ("Unknown mode given: '%s'\n", mode_str);
return BAD_CONFIG_FILE;
}
if (NULL == cfgfile)
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
cfg = GNUNET_CONFIGURATION_create ();
if (GNUNET_OK !=
GNUNET_CONFIGURATION_load (cfg,