aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-27 19:01:04 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-27 19:01:04 +0000
commit383eec1895fff4a83f26bb8244d86571dd5baef9 (patch)
treedc6eccf68932c71785ee86d688ebebeda2ac4025 /src/namestore
parent195267a6ac380d106d9409aa296885251d102c8e (diff)
downloadgnunet-383eec1895fff4a83f26bb8244d86571dd5baef9.tar.gz
gnunet-383eec1895fff4a83f26bb8244d86571dd5baef9.zip
reducing error messages about missing configuration options by introducing new helper functions to print them uniformly
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-namestore.c5
-rw-r--r--src/namestore/plugin_namestore_sqlite.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index fbb242569..94303a9e2 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -617,9 +617,8 @@ testservice_task (void *cls,
617 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns", 617 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
618 "ZONEKEY", &keyfile)) 618 "ZONEKEY", &keyfile))
619 { 619 {
620 fprintf (stderr, 620 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
621 _("Option `%s' not given, but I need a zone key file!\n"), 621 "gns", "ZONEKEY");
622 "z");
623 return; 622 return;
624 } 623 }
625 fprintf (stderr, 624 fprintf (stderr,
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index ef1f9b8e3..569f10f5b 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -199,10 +199,9 @@ database_setup (struct Plugin *plugin)
199 if (GNUNET_OK != 199 if (GNUNET_OK !=
200 GNUNET_CONFIGURATION_get_value_filename (plugin->cfg, "namestore-sqlite", 200 GNUNET_CONFIGURATION_get_value_filename (plugin->cfg, "namestore-sqlite",
201 "FILENAME", &afsdir)) 201 "FILENAME", &afsdir))
202 { 202 {
203 LOG (GNUNET_ERROR_TYPE_ERROR, 203 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
204 _ ("Option `%s' in section `%s' missing in configuration!\n"), 204 "namestore-sqlite", "FILENAME");
205 "FILENAME", "namestore-sqlite");
206 return GNUNET_SYSERR; 205 return GNUNET_SYSERR;
207 } 206 }
208 if (GNUNET_OK != GNUNET_DISK_file_test (afsdir)) 207 if (GNUNET_OK != GNUNET_DISK_file_test (afsdir))