aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/auditor/taler-auditor-exchange.c15
-rw-r--r--src/auditor/taler-auditor-sign.c2
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c42
-rw-r--r--src/benchmark/taler-exchange-benchmark.c2
4 files changed, 33 insertions, 28 deletions
diff --git a/src/auditor/taler-auditor-exchange.c b/src/auditor/taler-auditor-exchange.c
index 6ea4f713a..04c13fd0d 100644
--- a/src/auditor/taler-auditor-exchange.c
+++ b/src/auditor/taler-auditor-exchange.c
@@ -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;
}
diff --git a/src/auditor/taler-auditor-sign.c b/src/auditor/taler-auditor-sign.c
index ad2be67aa..0636900ff 100644
--- a/src/auditor/taler-auditor-sign.c
+++ b/src/auditor/taler-auditor-sign.c
@@ -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,
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index 1ca5df3ae..400706058 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -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);
}
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 462da0380..92b845fdc 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -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,