summaryrefslogtreecommitdiffstats
path: root/PICA_node.c
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-19 11:58:14 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-19 11:58:14 +0000
commit8babce2b7eba089b3102afd2fa75156ed8453f47 (patch)
treedcdb47e6b0c7c9c49530ff110bb410975ad1f469 /PICA_node.c
parent4cc364ed1ad41c90cd5332f1c55bbb8b6b5557b8 (diff)
downloadpica-pica-8babce2b7eba089b3102afd2fa75156ed8453f47.tar.gz
pica-pica-8babce2b7eba089b3102afd2fa75156ed8453f47.zip
default config location - sysconfdir. Fail if unable to open config file
git-svn-id: svn://localhost/project_picapica/trunk@170 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'PICA_node.c')
-rwxr-xr-xPICA_node.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/PICA_node.c b/PICA_node.c
index 3310bb7..763b394 100755
--- a/PICA_node.c
+++ b/PICA_node.c
@@ -2412,9 +2412,12 @@ int main(int argc,char** argv)
process_cmdline(argc, argv);
-nodecfg.config_file = (nodecfg.config_file ? nodecfg.config_file : "/etc/pica-node.conf");
+nodecfg.config_file = (nodecfg.config_file ? nodecfg.config_file :PICA_NODECONFIG_DEF_CONFIG_FILE);
-PICA_nodeconfig_load(nodecfg.config_file);
+if (!PICA_nodeconfig_load(nodecfg.config_file))
+ {
+ PICA_fatal("Unable to load configuration. Please check if config file %s exists and has correct permissions", nodecfg.config_file);
+ }
PICA_debug1("nodecfg.config_file = %s", nodecfg.config_file);
PICA_debug1("nodecfg.announced_addr = %s",nodecfg.announced_addr);