mirror of
https://github.com/moparisthebest/sslh
synced 2024-11-22 00:52:18 -05:00
Print error message upon non-existent configuration file
This commit is contained in:
parent
fecfb170c8
commit
5886bd2d43
@ -290,15 +290,12 @@ static int config_parse(char *filename, struct addrinfo **listen, struct proto *
|
|||||||
/* If it's a parse error then there will be a line number for the failure
|
/* If it's a parse error then there will be a line number for the failure
|
||||||
* an I/O error (such as non-existent file) will have the error line as 0
|
* an I/O error (such as non-existent file) will have the error line as 0
|
||||||
*/
|
*/
|
||||||
if (config_error_line(&config) != 0) {
|
|
||||||
fprintf(stderr, "%s:%d:%s\n",
|
fprintf(stderr, "%s:%d:%s\n",
|
||||||
filename,
|
filename,
|
||||||
config_error_line(&config),
|
config_error_line(&config),
|
||||||
config_error_text(&config));
|
config_error_text(&config));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
config_lookup_bool(&config, "verbose", &verbose);
|
config_lookup_bool(&config, "verbose", &verbose);
|
||||||
config_lookup_bool(&config, "inetd", &inetd);
|
config_lookup_bool(&config, "inetd", &inetd);
|
||||||
|
Loading…
Reference in New Issue
Block a user