summaryrefslogtreecommitdiffstats
path: root/runtime/conf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-28 18:23:53 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-28 18:23:53 +0200
commit8d8befaeca0d9ed3f096780e499a3231f16585c4 (patch)
tree36afcf98e28dd7bba95e383d397e4f6ad84cbf01 /runtime/conf.c
parentf8d9aad08222f59ba2d27437c1e2369896452aa1 (diff)
parent23dac82b684e966490de707a44144b3ad0ce2323 (diff)
downloadrsyslog-8d8befaeca0d9ed3f096780e499a3231f16585c4.tar.gz
rsyslog-8d8befaeca0d9ed3f096780e499a3231f16585c4.tar.xz
rsyslog-8d8befaeca0d9ed3f096780e499a3231f16585c4.zip
Merge branch 'v3-stable' into beta
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 ede15cc7..37716f88 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;
}