summaryrefslogtreecommitdiffstats
path: root/runtime/rsconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r--runtime/rsconf.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 5d2407ec..032d01a3 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -248,6 +248,7 @@ cnfDoActlst(struct cnfactlst *actlst, rule_t *pRule)
struct cnfcfsyslinelst *cflst;
action_t *pAction;
uchar *str;
+ rsRetVal localRet;
DEFiRet;
while(actlst != NULL) {
@@ -261,9 +262,22 @@ cnfDoActlst(struct cnfactlst *actlst, rule_t *pRule)
"around line %d", actlst->cnfFile, actlst->lineno);
}
} else {
- dbgprintf("legacy action line:%s\n", actlst->data.legActLine);
+ DBGPRINTF("legacy action line:%s\n", actlst->data.legActLine);
str = (uchar*) actlst->data.legActLine;
- CHKiRet(cflineDoAction(loadConf, &str, &pAction));
+ if((localRet = cflineDoAction(loadConf, &str, &pAction)) != RS_RET_OK) {
+ uchar szErrLoc[MAXFNAME + 64];
+ if(localRet != RS_RET_OK_WARN) {
+ DBGPRINTF("legacy action line NOT successfully processed\n");
+ }
+ snprintf((char*)szErrLoc, sizeof(szErrLoc) / sizeof(uchar),
+ "%s, line %d", actlst->cnfFile, actlst->lineno);
+ errmsg.LogError(0, NO_ERRCODE, "the last %s occured in %s:\"%s\"",
+ (localRet == RS_RET_OK_WARN) ? "warning" : "error",
+ (char*)szErrLoc, (char*)actlst->data.legActLine);
+ if(localRet != RS_RET_OK_WARN) {
+ ABORT_FINALIZE(localRet);
+ }
+ }
iRet = llAppend(&(pRule)->llActList, NULL, (void*) pAction);
}
for( cflst = actlst->syslines