diff options
-rw-r--r-- | config.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -98,5 +98,14 @@ config *parse_config(const char *filename) { char *line = get_line(&buf); char *value; char *name = strtok_r(line, "=", &value); + const config_opt *opt; + + /* Check to see if the config option name we got is valid. */ + for (opt = config_opts; opt->name != NULL && strcmp(name, opt->name); opt++); + + /* Is the config option valid? */ + if (opt->name != NULL) { + config_val val = parse_option_value(opt, value); + } } } |