diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-06 12:00:05 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-06 12:00:05 +0200 |
commit | 74b81c8c01b26a142793a4861340996ed956f5f6 (patch) | |
tree | 0a01b48d6bcc6a3fae57a0ed073e8a70f7fe9099 /runtime/rsconf.c | |
parent | 0426ad7dd27fda6854f7d306e46331387b20947a (diff) | |
parent | 88faed212c045cd53671155bd4af8a606b08b706 (diff) | |
download | rsyslog-74b81c8c01b26a142793a4861340996ed956f5f6.tar.gz rsyslog-74b81c8c01b26a142793a4861340996ed956f5f6.tar.xz rsyslog-74b81c8c01b26a142793a4861340996ed956f5f6.zip |
Merge branch 'v6-stable' into v6-devel
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 18 |
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 |