diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-09-26 12:48:57 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-09-26 12:48:57 +0200 |
commit | f2528ec101eb660560c7ec327d440cbb17f04f14 (patch) | |
tree | 05083efcd96dedc9387579caa17c81b8b78592c6 /runtime | |
parent | ceb336f0398e37ab51b4b54a14fa394d53ccdf3f (diff) | |
parent | 0c7604dc27119122a3022c7bf094ffb5f8d59e6d (diff) | |
download | rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.tar.gz rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.tar.xz rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
runtime/conf.c
tools/omfile.c
tools/omusrmsg.c
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/conf.c | 7 | ||||
-rw-r--r-- | runtime/module-template.h | 2 | ||||
-rw-r--r-- | runtime/msg.c | 1 | ||||
-rw-r--r-- | runtime/rsyslog.h | 1 |
4 files changed, 9 insertions, 2 deletions
diff --git a/runtime/conf.c b/runtime/conf.c index f47ac501..ec612ab8 100644 --- a/runtime/conf.c +++ b/runtime/conf.c @@ -716,6 +716,7 @@ rsRetVal cflineDoAction(rsconf_t *conf, uchar **p, action_t **ppAction) modInfo_t *pMod; cfgmodules_etry_t *node; omodStringRequest_t *pOMSR; + int bHadWarning = 0; action_t *pAction = NULL; void *pModData; DEFiRet; @@ -735,6 +736,10 @@ rsRetVal cflineDoAction(rsconf_t *conf, uchar **p, action_t **ppAction) pMod = node->pMod; iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR); dbgprintf("tried selector action for %s: %d\n", module.GetName(pMod), iRet); + if(iRet == RS_RET_OK_WARN) { + bHadWarning = 1; + iRet = RS_RET_OK; + } if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) { /* advance our config parser state: we now only accept an $End as valid, * no more action statments. @@ -769,6 +774,8 @@ rsRetVal cflineDoAction(rsconf_t *conf, uchar **p, action_t **ppAction) } *ppAction = pAction; + if(iRet == RS_RET_OK && bHadWarning) + iRet = RS_RET_OK_WARN; RETiRet; } diff --git a/runtime/module-template.h b/runtime/module-template.h index d360447a..95107cb6 100644 --- a/runtime/module-template.h +++ b/runtime/module-template.h @@ -285,7 +285,7 @@ static rsRetVal parseSelectorAct(uchar **pp, void **ppModData, omodStringRequest #define CODE_STD_FINALIZERparseSelectorAct \ finalize_it:\ - if(iRet == RS_RET_OK || iRet == RS_RET_SUSPENDED) {\ + if(iRet == RS_RET_OK || iRet == RS_RET_OK_WARN || iRet == RS_RET_SUSPENDED) {\ *ppModData = pData;\ *pp = p;\ } else {\ diff --git a/runtime/msg.c b/runtime/msg.c index 420fa542..bd1950ad 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -1733,7 +1733,6 @@ getTAG(msg_t *pM, uchar **ppBuf, int *piLen) *piLen = pM->iLenTAG; } } -dbgprintf("getTAG: len %d, buf '%s'\n", *piLen, *ppBuf); } diff --git a/runtime/rsyslog.h b/runtime/rsyslog.h index cc1044a1..fc8578a8 100644 --- a/runtime/rsyslog.h +++ b/runtime/rsyslog.h @@ -352,6 +352,7 @@ enum rsRetVal_ /** return value. All methods return this if not specified oth RS_RET_WRN_WRKDIR = -2182, /**< correctable problems with the rsyslog working directory */ RS_RET_ERR_QUEUE_EMERGENCY = -2183, /**< some fatal error caused queue to switch to emergency mode */ RS_RET_OUTDATED_STMT = -2184, /**< some outdated statement/functionality is being used in conf file */ + RS_RET_OK_WARN = -2185, /**< config part: everything was OK, but a warning message was emitted */ RS_RET_INVLD_CONF_OBJ= -2200, /**< invalid config object (e.g. $Begin conf statement) */ RS_RET_ERR_LIBEE_INIT = -2201, /**< cannot obtain libee ctx */ |