git ssb

0+

cel / sslh



Commit 2192b2830337c5420f58a689271de0e5adbca710

Check line number of error so that this works with libconfig-1.3.2 in CentOS6

James Hogarth committed on 4/17/2015, 10:40:57 PM
Parent: 77a74f0c52b1b936bf0131b06d78489631a615a6

Files changed

sslh-main.cchanged
sslh-main.cView
@@ -279,9 +279,12 @@
279279 const char* str;
280280
281281 config_init(&config);
282282 if (config_read_file(&config, filename) == CONFIG_FALSE) {
283- if (config_error_type(&config) == CONFIG_ERR_PARSE) {
283+/* If it's a parse error then there will be a line number for the failure
284+ * an I/O error (such as non-existent file) will have the error line as 0
285+ */
286+ if (config_error_line(&config) != 0) {
284287 fprintf(stderr, "%s:%d:%s\n",
285288 filename,
286289 config_error_line(&config),
287290 config_error_text(&config));

Built with git-ssb-web