From 2e9c1f139597dc485f1e45280cc6535f93b99c38 Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 20 May 2004 07:52:07 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@3025 f38db490-d61c-443f-a65b-d21fe96a405b --- config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config.c') 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 -- cgit v1.2.3