summaryrefslogtreecommitdiffstats
path: root/runtime/conf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-28 19:01:34 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-28 19:01:34 +0200
commit29cacc3c8ad6694b1ae2a5480fca7059773d06f0 (patch)
tree1c4996d03a90ddb4ad6ea236ee8f72194a13b99e /runtime/conf.c
parentcbbf1586a204a897a050b6cb294b120e3ff5f23c (diff)
parentd7c98e7a6ec28a6c76bccf16d83f36b34a705410 (diff)
downloadrsyslog-29cacc3c8ad6694b1ae2a5480fca7059773d06f0.tar.gz
rsyslog-29cacc3c8ad6694b1ae2a5480fca7059773d06f0.tar.xz
rsyslog-29cacc3c8ad6694b1ae2a5480fca7059773d06f0.zip
Merge branch 'master' into v5-devel
Conflicts: tests/Makefile.am
Diffstat (limited to 'runtime/conf.c')
-rw-r--r--runtime/conf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/conf.c b/runtime/conf.c
index c776ef46..1691e23a 100644
--- a/runtime/conf.c
+++ b/runtime/conf.c
@@ -400,6 +400,7 @@ processConfFile(uchar *pConfFile)
uchar cbuf[CFGLNSIZ];
uchar *cline;
int i;
+ int bHadAnError = 0;
ASSERT(pConfFile != NULL);
if((cf = fopen((char*)pConfFile, "r")) == NULL) {
@@ -461,6 +462,7 @@ processConfFile(uchar *pConfFile)
snprintf((char*)szErrLoc, sizeof(szErrLoc) / sizeof(uchar),
"%s, line %d", pConfFile, iLnNbr);
errmsg.LogError(0, NO_ERRCODE, "the last error occured in %s", (char*)szErrLoc);
+ bHadAnError = 1;
}
}
@@ -480,6 +482,10 @@ finalize_it:
dbgprintf("error %d processing config file '%s'; os error (if any): %s\n",
iRet, pConfFile, errStr);
}
+
+ if(bHadAnError && (iRet == RS_RET_OK)) { /* a bit dirty, enhance in future releases */
+ iRet = RS_RET_ERR;
+ }
RETiRet;
}