From 8babce2b7eba089b3102afd2fa75156ed8453f47 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 19 Aug 2012 11:58:14 +0000 Subject: 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 --- PICA_node.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'PICA_node.c') 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); -- cgit v1.2.1