diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-17 09:47:11 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-17 09:47:11 +0000 |
commit | 3e2bee073b23c1c96e908d87ec93490488c13216 (patch) | |
tree | 55ae9fe46454e63ef9d6307d093a949ed330be2d | |
parent | 83c6a060be679722cefc531eaec40771ba5a3f21 (diff) | |
download | rsyslog-3e2bee073b23c1c96e908d87ec93490488c13216.tar.gz rsyslog-3e2bee073b23c1c96e908d87ec93490488c13216.tar.xz rsyslog-3e2bee073b23c1c96e908d87ec93490488c13216.zip |
command $ResetConfigVariables implemented for immark.c
-rw-r--r-- | plugins/immark/immark.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/immark/immark.c b/plugins/immark/immark.c index bb074d5c..fa603260 100644 --- a/plugins/immark/immark.c +++ b/plugins/immark/immark.c @@ -45,9 +45,12 @@ MODULE_TYPE_INPUT TERM_SYNC_TYPE(eTermSync_SIGNAL) +/* defines */ +#define DEFAULT_MARK_PERIOD (20 * 60) + /* Module static data */ DEF_OMOD_STATIC_DATA -static int iMarkMessagePeriod = 5; +static int iMarkMessagePeriod = DEFAULT_MARK_PERIOD; typedef struct _instanceData { } instanceData; @@ -112,12 +115,19 @@ CODESTARTqueryEtryPt CODEqueryEtryPt_STD_IMOD_QUERIES ENDqueryEtryPt +static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) +{ + iMarkMessagePeriod = DEFAULT_MARK_PERIOD; + + return RS_RET_OK; +} BEGINmodInit() CODESTARTmodInit *ipIFVersProvided = 1; /* so far, we only support the initial definition */ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(omsdRegCFSLineHdlr((uchar *)"markmessageperiod", 0, eCmdHdlrInt, NULL, &iMarkMessagePeriod, STD_LOADABLE_MODULE_ID)); + CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID)); ENDmodInit #endif /* #if 0 */ /* |