git ssb

0+

cel / sslh



Commit 5886bd2d43db3ee6a9ae58e3e47c34e07cf80f00

Print error message upon non-existent configuration file

Yves Rutschle committed on 7/16/2015, 3:43:05 PM
Parent: fecfb170c84cd6119165581a419a6545286f203a

Files changed

sslh-main.cchanged
sslh-main.cView
@@ -286,19 +286,16 @@
286286 const char* str;
287287
288288 config_init(&config);
289289 if (config_read_file(&config, filename) == CONFIG_FALSE) {
290-/* If it's a parse error then there will be a line number for the failure
291- * an I/O error (such as non-existent file) will have the error line as 0
292- */
293- if (config_error_line(&config) != 0) {
294- fprintf(stderr, "%s:%d:%s\n",
295- filename,
296- config_error_line(&config),
297- config_error_text(&config));
298- exit(1);
299- }
300- return 1;
290+ /* If it's a parse error then there will be a line number for the failure
291+ * an I/O error (such as non-existent file) will have the error line as 0
292+ */
293+ fprintf(stderr, "%s:%d:%s\n",
294+ filename,
295+ config_error_line(&config),
296+ config_error_text(&config));
297+ exit(1);
301298 }
302299
303300 config_lookup_bool(&config, "verbose", &verbose);
304301 config_lookup_bool(&config, "inetd", &inetd);

Built with git-ssb-web