summaryrefslogtreecommitdiffstats
path: root/omfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-24 09:45:19 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-24 09:45:19 +0000
commitf97c90d12b9ae64a64cde84bb3fa3ca5ee207838 (patch)
treef308e54af6d65da17e398dd0964aa70b97a8cee4 /omfile.c
parentf48f11f50e9337e499e6e7b56ca3f143cb55f181 (diff)
downloadrsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.tar.gz
rsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.tar.xz
rsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.zip
moved discard functionality to an output module
Diffstat (limited to 'omfile.c')
-rw-r--r--omfile.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/omfile.c b/omfile.c
index d335fc9d..61e4624a 100644
--- a/omfile.c
+++ b/omfile.c
@@ -48,6 +48,17 @@
#include "omfile.h"
+/* query feature compatibility
+ */
+static rsRetVal isCompatibleWithFeature(syslogFeature eFeat)
+{
+ if(eFeat == sFEATURERepeatedMsgReduction)
+ return RS_RET_OK;
+
+ return RS_RET_INCOMPATIBLE;
+}
+
+
/* Helper to cfline(). Parses a output channel name up until the first
* comma and then looks for the template specifier. Tries
* to find that template. Maps the output channel to the
@@ -504,9 +515,8 @@ rsRetVal freeInstanceFile(selector_t *f)
/* call the shell action
- * returns 0 if it succeeds, something else otherwise
*/
-rsRetVal doActionFile(selector_t *f)
+static rsRetVal doActionFile(selector_t *f)
{
assert(f != NULL);
@@ -517,7 +527,7 @@ rsRetVal doActionFile(selector_t *f)
*/
if(f->f_un.f_file.bDynamicName || (f->f_file != -1))
writeFile(f);
- return 0;
+ return RS_RET_OK;
}
/* try to process a selector action line. Checks if the action
@@ -660,6 +670,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())
*pEtryPoint = doActionFile;
} else if(!strcmp((char*) name, "parseSelectorAct")) {
*pEtryPoint = parseSelectorAct;
+ } else if(!strcmp((char*) name, "isCompatibleWithFeature")) {
+ *pEtryPoint = isCompatibleWithFeature;
} else if(!strcmp((char*) name, "freeInstance")) {
*pEtryPoint = freeInstanceFile;
}