summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-10-11 15:38:09 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-11 15:38:09 +0200
commit7bebfd3b60894bd913e3d6cbcad5447a607e0a0b (patch)
tree4243c632639de11ccb08eebd014851f1bc3f6711 /tools
parent156382746626459aaf64d79eac95183d1ab60680 (diff)
parent2ae9e456db8991e61b4aa48cf9b74f6d20689ce4 (diff)
downloadrsyslog-7bebfd3b60894bd913e3d6cbcad5447a607e0a0b.tar.gz
rsyslog-7bebfd3b60894bd913e3d6cbcad5447a607e0a0b.tar.xz
rsyslog-7bebfd3b60894bd913e3d6cbcad5447a607e0a0b.zip
Merge branch 'beta'
Conflicts: ChangeLog configure.ac doc/manual.html
Diffstat (limited to 'tools')
-rw-r--r--tools/omdiscard.c8
-rw-r--r--tools/omfile.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/omdiscard.c b/tools/omdiscard.c
index 182c4b63..15c6ea82 100644
--- a/tools/omdiscard.c
+++ b/tools/omdiscard.c
@@ -35,6 +35,7 @@
#include "syslogd-types.h"
#include "omdiscard.h"
#include "module-template.h"
+#include "errmsg.h"
MODULE_TYPE_OUTPUT
MODULE_TYPE_NOKEEP
@@ -42,6 +43,7 @@ MODULE_TYPE_NOKEEP
/* internal structures
*/
DEF_OMOD_STATIC_DATA
+DEFobjCurrIf(errmsg);
typedef struct _instanceData {
EMPTY_STRUCT
@@ -92,8 +94,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(0)
p = *pp;
if(*p == '~') {
- /* TODO: check the rest of the selector line - error reporting */
dbgprintf("discard\n");
+ errmsg.LogError(0, RS_RET_DEPRECATED, "warning: ~ action "
+ "is deprecated, consider using the 'stop' "
+ "statement instead");
} else {
iRet = RS_RET_CONFLINE_UNPROCESSED;
}
@@ -103,6 +107,7 @@ ENDparseSelectorAct
BEGINmodExit
CODESTARTmodExit
+ objRelease(errmsg, CORE_COMPONENT);
ENDmodExit
@@ -116,6 +121,7 @@ BEGINmodInit(Discard)
CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
+ CHKiRet(objUse(errmsg, CORE_COMPONENT));
ENDmodInit
/*
* vi:set ai:
diff --git a/tools/omfile.c b/tools/omfile.c
index 8969d16d..c7e0dc25 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -970,7 +970,7 @@ CODESTARTnewActInst
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
}
- tplToUse = (pData->tplName == NULL) ? ustrdup(getDfltTpl()) : pData->tplName;
+ tplToUse = ustrdup((pData->tplName == NULL) ? getDfltTpl() : pData->tplName);
CHKiRet(OMSRsetEntry(*ppOMSR, 0, tplToUse, OMSR_NO_RQD_TPL_OPTS));
if(pData->bDynamicName) {