summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-05-20 07:52:07 +0000
committerMark Spencer <markster@digium.com>2004-05-20 07:52:07 +0000
commita1054554875284edc268c8a3c730acbe536ad541 (patch)
treeabf856ca86fa4aa46c993718d7ec0fe45ffacf9f /config.c
parent0882f61a8e1a9e60c8b2712cb60ee7bf2d88a1d1 (diff)
Stage 1 of deadlock fix (bug #1673 -- but not yet solved, just started) and fix configs ending with no newline (bug #1672)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'config.c')
-rwxr-xr-xconfig.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/config.c b/config.c
index 574561ab3..954d09509 100755
--- a/config.c
+++ b/config.c
@@ -740,9 +740,8 @@ static struct ast_config *__ast_load(char *configfile, struct ast_config *tmp, s
return NULL;
}
while(!feof(f)) {
- fgets(buf, sizeof(buf), f);
lineno++;
- if (!feof(f)) {
+ if (fgets(buf, sizeof(buf), f)) {
if (cfg_process(tmp, _tmpc, _last, buf, lineno, configfile, includelevel
#ifdef PRESERVE_COMMENTS
, acs