Mercurial > masqmail
comparison src/conf.c @ 428:e972c3cbe1e0
Bugfix: Read as long as there *is* content.
Before this fix masqmail did not read the contents of files that
were given as values to config items.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 03 Apr 2013 21:45:57 +0200 |
parents | f37384470855 |
children | 5593964ec779 |
comparison
equal
deleted
inserted
replaced
427:c96a755b5fc4 | 428:e972c3cbe1e0 |
---|---|
89 if (!(fptr = fopen(fname, "rt"))) { | 89 if (!(fptr = fopen(fname, "rt"))) { |
90 logwrite(LOG_ALERT, "could not open %s for reading: %s\n", | 90 logwrite(LOG_ALERT, "could not open %s for reading: %s\n", |
91 fname, strerror(errno)); | 91 fname, strerror(errno)); |
92 exit(1); | 92 exit(1); |
93 } | 93 } |
94 while (!fgets(buf, sizeof buf, fptr)) { | 94 while (fgets(buf, sizeof buf, fptr)) { |
95 g_strstrip(buf); | 95 g_strstrip(buf); |
96 if (!*buf || *buf == '#') { | 96 if (!*buf || *buf == '#') { |
97 continue; | 97 continue; |
98 } | 98 } |
99 DEBUG(9) fprintf(stderr, "parse_list_file: item = %s\n", buf); | 99 DEBUG(9) fprintf(stderr, "parse_list_file: item = %s\n", buf); |