summaryrefslogtreecommitdiffstats
path: root/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-17 09:42:03 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-17 09:42:03 +0000
commit83c6a060be679722cefc531eaec40771ba5a3f21 (patch)
treecce8747ddb453151d478115f0da284114cc0a0cc /module-template.h
parentb5d69df3af01cf722f11c560c67cfa6b2b7cf765 (diff)
downloadrsyslog-83c6a060be679722cefc531eaec40771ba5a3f21.tar.gz
rsyslog-83c6a060be679722cefc531eaec40771ba5a3f21.tar.xz
rsyslog-83c6a060be679722cefc531eaec40771ba5a3f21.zip
implemented $MarkMessagePeriod config directive
Diffstat (limited to 'module-template.h')
-rw-r--r--module-template.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/module-template.h b/module-template.h
index a0994d08..4dbb5a2c 100644
--- a/module-template.h
+++ b/module-template.h
@@ -378,6 +378,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
*pEtryPoint = runInput;\
} else if(!strcmp((char*) name, "getTermSyncType")) {\
*pEtryPoint = modGetTermSyncType;\
+ } else if(!strcmp((char*) name, "willRun")) {\
+ *pEtryPoint = willRun;\
}
/* modInit()
@@ -469,6 +471,27 @@ static rsRetVal runInput(thrdInfo_t *pThrd)\
return iRet;\
}
+
+/* willRun()
+ * This is a function that will be replaced in the longer term. It is used so
+ * that a module can tell the caller if it will run or not. This is to be replaced
+ * when we introduce input module instances. However, these require config syntax
+ * changes and I may (or may not... ;)) hold that until another config file
+ * format is available. -- rgerhards, 2007-12-17
+ * returns RS_RET_NO_RUN if it will not run (RS_RET_OK or error otherwise)
+ */
+#define BEGINwillRun \
+static rsRetVal willRun(void)\
+{\
+ DEFiRet;
+
+#define CODESTARTwillRun
+
+#define ENDwillRun \
+ return iRet;\
+}
+
+
/* method to return which termination sync method is used by this module.
*/
#define TERM_SYNC_TYPE(x) \