load config file from correct location
This commit is contained in:
parent
b83ec3a794
commit
adf854cd4a
@ -104,7 +104,13 @@ main (int argc,
|
|||||||
return EXIT_INVALIDARGUMENT;
|
return EXIT_INVALIDARGUMENT;
|
||||||
}
|
}
|
||||||
if (NULL == cfgfile)
|
if (NULL == cfgfile)
|
||||||
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
|
cfgfile = GNUNET_CONFIGURATION_default_filename ();
|
||||||
|
if (NULL == cfgfile)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Can't find default configuration file.\n");
|
||||||
|
return EXIT_NOTCONFIGURED;
|
||||||
|
}
|
||||||
cfg = GNUNET_CONFIGURATION_create ();
|
cfg = GNUNET_CONFIGURATION_create ();
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
|
@ -591,7 +591,13 @@ main (int argc,
|
|||||||
(NULL == loglev) ? "INFO" : loglev,
|
(NULL == loglev) ? "INFO" : loglev,
|
||||||
logfile));
|
logfile));
|
||||||
if (NULL == cfgfile)
|
if (NULL == cfgfile)
|
||||||
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
|
cfgfile = GNUNET_CONFIGURATION_default_filename ();
|
||||||
|
if (NULL == cfgfile)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Can't find default configuration file.\n");
|
||||||
|
return EXIT_NOTCONFIGURED;
|
||||||
|
}
|
||||||
cfg = GNUNET_CONFIGURATION_create ();
|
cfg = GNUNET_CONFIGURATION_create ();
|
||||||
if (GNUNET_SYSERR ==
|
if (GNUNET_SYSERR ==
|
||||||
GNUNET_CONFIGURATION_load (cfg,
|
GNUNET_CONFIGURATION_load (cfg,
|
||||||
|
@ -775,8 +775,13 @@ main (int argc,
|
|||||||
return BAD_CONFIG_FILE;
|
return BAD_CONFIG_FILE;
|
||||||
}
|
}
|
||||||
if (NULL == cfg_filename)
|
if (NULL == cfg_filename)
|
||||||
cfg_filename = GNUNET_strdup (
|
cfg_filename = GNUNET_CONFIGURATION_default_filename ();
|
||||||
GNUNET_OS_project_data_get ()->user_config_file);
|
if (NULL == cfg_filename)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Can't find default configuration file.\n");
|
||||||
|
return EXIT_NOTCONFIGURED;
|
||||||
|
}
|
||||||
cfg = GNUNET_CONFIGURATION_create ();
|
cfg = GNUNET_CONFIGURATION_create ();
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_load (cfg,
|
GNUNET_CONFIGURATION_load (cfg,
|
||||||
|
@ -990,8 +990,13 @@ main (int argc,
|
|||||||
return BAD_CONFIG_FILE;
|
return BAD_CONFIG_FILE;
|
||||||
}
|
}
|
||||||
if (NULL == cfg_filename)
|
if (NULL == cfg_filename)
|
||||||
cfg_filename = GNUNET_strdup (
|
cfg_filename = GNUNET_CONFIGURATION_default_filename ();
|
||||||
GNUNET_OS_project_data_get ()->user_config_file);
|
if (NULL == cfg_filename)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Can't find default configuration file.\n");
|
||||||
|
return EXIT_NOTCONFIGURED;
|
||||||
|
}
|
||||||
cfg = GNUNET_CONFIGURATION_create ();
|
cfg = GNUNET_CONFIGURATION_create ();
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_load (cfg,
|
GNUNET_CONFIGURATION_load (cfg,
|
||||||
|
@ -1688,7 +1688,14 @@ main (int argc,
|
|||||||
GNUNET_free (loglev);
|
GNUNET_free (loglev);
|
||||||
GNUNET_free (logfile);
|
GNUNET_free (logfile);
|
||||||
if (NULL == cfgfile)
|
if (NULL == cfgfile)
|
||||||
cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);
|
cfgfile = GNUNET_CONFIGURATION_default_filename ();
|
||||||
|
if (NULL == cfgfile)
|
||||||
|
{
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
|
"Can't find default configuration file.\n");
|
||||||
|
return EXIT_NOTCONFIGURED;
|
||||||
|
}
|
||||||
|
|
||||||
TEH_cfg = GNUNET_CONFIGURATION_create ();
|
TEH_cfg = GNUNET_CONFIGURATION_create ();
|
||||||
if (GNUNET_SYSERR ==
|
if (GNUNET_SYSERR ==
|
||||||
GNUNET_CONFIGURATION_load (TEH_cfg,
|
GNUNET_CONFIGURATION_load (TEH_cfg,
|
||||||
|
Loading…
Reference in New Issue
Block a user