mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
added comments
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@64 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
4e4230df01
commit
2307913bc2
1 changed files with 4 additions and 5 deletions
|
@ -25,17 +25,18 @@ int config_parse(const char *filename, config_t *cfg, struct settings *g)
|
|||
);
|
||||
}
|
||||
|
||||
/* Get and check config sections */
|
||||
config_setting_t *cfg_root = config_root_setting(cfg);
|
||||
if (!cfg_root || !config_setting_is_group(cfg_root))
|
||||
error("Missing global section in config");
|
||||
error("Missing global section in config file: %s", filename);
|
||||
|
||||
config_setting_t *cfg_nodes = config_setting_get_member(cfg_root, "nodes");
|
||||
if (!cfg_nodes || !config_setting_is_group(cfg_nodes))
|
||||
error("Missing node section in config");
|
||||
error("Missing node section in config file: %s", filename);
|
||||
|
||||
config_setting_t *cfg_paths = config_setting_get_member(cfg_root, "paths");
|
||||
if (!cfg_paths || !config_setting_is_list(cfg_paths))
|
||||
error("Missing path section in config");
|
||||
error("Missing path section in config file: %s", filename);
|
||||
|
||||
/* Read global settings */
|
||||
config_parse_global(cfg_root, g);
|
||||
|
@ -136,8 +137,6 @@ int config_parse_node(config_setting_t *c, struct settings *g)
|
|||
struct sockaddr_in local, remote;
|
||||
enum node_type type;
|
||||
|
||||
/* Optional settings */
|
||||
|
||||
/* Required settings */
|
||||
name = config_setting_name(c);
|
||||
if (!name)
|
||||
|
|
Loading…
Add table
Reference in a new issue