summaryrefslogtreecommitdiffstats
path: root/plugins/immark/immark.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/immark/immark.c')
-rw-r--r--plugins/immark/immark.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/immark/immark.c b/plugins/immark/immark.c
index 72750e65..bb074d5c 100644
--- a/plugins/immark/immark.c
+++ b/plugins/immark/immark.c
@@ -46,9 +46,8 @@ MODULE_TYPE_INPUT
TERM_SYNC_TYPE(eTermSync_SIGNAL)
/* Module static data */
-/* TODO: this needs a lot of work ;) */
DEF_OMOD_STATIC_DATA
-static int bDoMarkMessages = 1;
+static int iMarkMessagePeriod = 5;
typedef struct _instanceData {
} instanceData;
@@ -77,7 +76,7 @@ CODESTARTrunInput
* if a cleanup is needed. But for now, we can just use CHKiRet().
* rgerhards, 2007-12-17
*/
- CHKiRet(thrdSleep(pThrd, 5, 0)); /* seconds, micro seconds */
+ CHKiRet(thrdSleep(pThrd, iMarkMessagePeriod, 0)); /* seconds, micro seconds */
logmsgInternal(LOG_INFO, "-- MARK --", ADDDATE);
//logmsgInternal(LOG_INFO, "-- MARK --", ADDDATE|MARK);
}
@@ -86,6 +85,13 @@ finalize_it:
ENDrunInput
+BEGINwillRun
+CODESTARTwillRun
+ if(iMarkMessagePeriod == 0)
+ iRet = RS_RET_NO_RUN;
+ENDwillRun
+
+
BEGINfreeInstance
CODESTARTfreeInstance
ENDfreeInstance
@@ -111,7 +117,7 @@ BEGINmodInit()
CODESTARTmodInit
*ipIFVersProvided = 1; /* so far, we only support the initial definition */
CODEmodInit_QueryRegCFSLineHdlr
- CHKiRet(omsdRegCFSLineHdlr((uchar *)"markmessages", 0, eCmdHdlrBinary, NULL, &bDoMarkMessages, STD_LOADABLE_MODULE_ID));
+ CHKiRet(omsdRegCFSLineHdlr((uchar *)"markmessageperiod", 0, eCmdHdlrInt, NULL, &iMarkMessagePeriod, STD_LOADABLE_MODULE_ID));
ENDmodInit
#endif /* #if 0 */
/*