summaryrefslogtreecommitdiffstats
path: root/ommysql.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 /ommysql.c
parentf48f11f50e9337e499e6e7b56ca3f143cb55f181 (diff)
downloadrsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.tar.gz
rsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.tar.xz
rsyslog-f97c90d12b9ae64a64cde84bb3fa3ca5ee207838.zip
moved discard functionality to an output module
Diffstat (limited to 'ommysql.c')
-rw-r--r--ommysql.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/ommysql.c b/ommysql.c
index afa46906..d5613ce8 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -45,6 +45,17 @@
#include "mysql/errmsg.h"
+/* query feature compatibility
+ */
+static rsRetVal isCompatibleWithFeature(syslogFeature eFeat)
+{
+ if(eFeat == sFEATURERepeatedMsgReduction)
+ return RS_RET_OK;
+
+ return RS_RET_INCOMPATIBLE;
+}
+
+
/**
* DBErrorHandler
*
@@ -258,15 +269,14 @@ void writeMySQL(register selector_t *f)
}
/* call the shell action
- * returns 0 if it succeeds, something else otherwise
*/
-int doActionMySQL(selector_t *f)
+static rsRetVal doActionMySQL(selector_t *f)
{
assert(f != NULL);
dprintf("\n");
writeMySQL(f);
- return 0;
+ return RS_RET_OK;
}
@@ -392,6 +402,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())
*pEtryPoint = doActionMySQL;
} else if(!strcmp((char*) name, "parseSelectorAct")) {
*pEtryPoint = parseSelectorAct;
+ } else if(!strcmp((char*) name, "isCompatibleWithFeature")) {
+ *pEtryPoint = isCompatibleWithFeature;
} /*else if(!strcmp((char*) name, "freeInstance")) {
*pEtryPoint = freeInstanceFile;
}*/