Fix silly problem where default config is applied after reading the config file.

This commit is contained in:
Jan Vidar Krey 2010-04-09 10:22:45 +02:00
parent 45462595ac
commit d3ebc409cb

View File

@ -190,6 +190,7 @@ int read_config(const char* file, struct hub_config* config, int allow_missing)
int ret; int ret;
memset(config, 0, sizeof(struct hub_config)); memset(config, 0, sizeof(struct hub_config));
config_defaults(config);
ret = file_read_lines(file, config, &config_parse_line); ret = file_read_lines(file, config, &config_parse_line);
if (ret < 0) if (ret < 0)
@ -204,7 +205,6 @@ int read_config(const char* file, struct hub_config* config, int allow_missing)
} }
} }
config_defaults(config);
return 0; return 0;
} }