Load host specific settings from configuration file

This commit is contained in:
Iwan Timmer 2015-08-03 19:42:42 +02:00
parent 7a200fea64
commit d3c3ba92c7
2 changed files with 5 additions and 1 deletions

View File

@ -178,6 +178,10 @@ int main(int argc, char* argv[]) {
} }
} }
char host_config_file[128];
sprintf(host_config_file, "hosts/%s.conf", config.address);
config_file_parse(host_config_file, &config);
PSERVER_DATA server; PSERVER_DATA server;
if (gs_init(server, config.address, config.key_dir) != GS_OK) { if (gs_init(server, config.address, config.key_dir) != GS_OK) {
fprintf(stderr, "Can't connect to server %s\n", config.address); fprintf(stderr, "Can't connect to server %s\n", config.address);