summaryrefslogtreecommitdiffstats
path: root/runtime
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
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')
-rw-r--r--runtime/conf.c6
-rw-r--r--runtime/vm.c1
2 files changed, 7 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;
}
diff --git a/runtime/vm.c b/runtime/vm.c
index a25476c2..23adea8b 100644
--- a/runtime/vm.c
+++ b/runtime/vm.c
@@ -25,6 +25,7 @@
#include "config.h"
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include "rsyslog.h"