From f97c90d12b9ae64a64cde84bb3fa3ca5ee207838 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 24 Jul 2007 09:45:19 +0000 Subject: moved discard functionality to an output module --- omshell.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'omshell.c') diff --git a/omshell.c b/omshell.c index 0718e66d..6b67dff4 100644 --- a/omshell.c +++ b/omshell.c @@ -40,10 +40,20 @@ #include "omshell.h" +/* query feature compatibility + */ +static rsRetVal isCompatibleWithFeature(syslogFeature eFeat) +{ + if(eFeat == sFEATURERepeatedMsgReduction) + return RS_RET_OK; + + return RS_RET_INCOMPATIBLE; +} + + /* call the shell action - * returns 0 if it succeeds, something else otherwise */ -int doActionShell(selector_t *f) +static rsRetVal doActionShell(selector_t *f) { uchar *psz; @@ -58,7 +68,7 @@ int doActionShell(selector_t *f) if(execProg((uchar*) f->f_un.f_file.f_fname, 1, (uchar*) psz) == 0) logerrorSz("Executing program '%s' failed", f->f_un.f_file.f_fname); - return 0; + return RS_RET_OK; } @@ -108,6 +118,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)()) *pEtryPoint = doActionShell; } else if(!strcmp((char*) name, "parseSelectorAct")) { *pEtryPoint = parseSelectorAct; + } else if(!strcmp((char*) name, "isCompatibleWithFeature")) { + *pEtryPoint = isCompatibleWithFeature; } /*else if(!strcmp((char*) name, "freeInstance")) { *pEtryPoint = freeInstanceFile; } */ -- cgit