diff --git a/src/common/options.c b/src/common/options.c --- a/src/common/options.c +++ b/src/common/options.c @@ -30,13 +30,13 @@ int execlisten() return 0; } -int genericfunc() +int parseconf() { - /* Conf File Parser */ +/* Conf File Parser */ cfg_opt_t opts[] = { - CFG_STR("test", "mneh", CFGF_NONE), + CFG_STR("username", "guest", CFGF_NONE), CFG_END() }; cfg_t *cfg; @@ -45,18 +45,8 @@ int genericfunc() return 1; /* End Conf File Parser */ - +// Testing code: + printf("Client Username: %s\n", cfg_getstr(cfg, "username")); cfg_free(cfg); - - cfg = cfg_init(opts, CFGF_NONE); - if(cfg_parse(cfg, "distrend.conf") == CFG_PARSE_ERROR) - return 1; -/* End Conf File Parser */ - - printf("Conf File Test: %s\n", cfg_getstr(cfg, "test")); - - - cfg_free(cfg); - return 0; }