summaryrefslogtreecommitdiff
path: root/tools/omdiscard.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-10-16 16:44:03 +0200
committerMichael Biebl <biebl@debian.org>2012-10-16 16:44:03 +0200
commit1fc4db11217caa3faebbfde8bd310fb64c9f860c (patch)
tree39fca9174460f0a55e46b67793dea0c35e537ac0 /tools/omdiscard.c
parent64b89c604c6cec4fd0de51f2776f95b34e388bae (diff)
downloadrsyslog-1fc4db11217caa3faebbfde8bd310fb64c9f860c.tar.gz
Imported Upstream version 7.1.11upstream/7.1.11
Diffstat (limited to 'tools/omdiscard.c')
-rw-r--r--tools/omdiscard.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/omdiscard.c b/tools/omdiscard.c
index 182c4b6..15c6ea8 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: