diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 16:51:34 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-12-14 16:51:34 +0000 |
commit | 6c0c26dc96544aa5814d00045b3d559c99fc1b2e (patch) | |
tree | 20d558391ba1d881ab3b27f7fbcc636dcfbc67ad /plugins | |
parent | 6a80d9ee504b57e2b815c91698785d4fcd06f62e (diff) | |
download | rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.gz rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.tar.xz rsyslog-6c0c26dc96544aa5814d00045b3d559c99fc1b2e.zip |
on the way to a real input module interface and threading class...
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/immark/immark.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/immark/immark.c b/plugins/immark/immark.c index d70069c5..a43ea61e 100644 --- a/plugins/immark/immark.c +++ b/plugins/immark/immark.c @@ -39,10 +39,16 @@ #include <pthread.h> #include "rsyslog.h" #include "syslogd.h" +#include "cfsysline.h" #include "module-template.h" MODULE_TYPE_INPUT +/* Module static data */ +/* TODO: this needs a lot of work ;) */ +DEF_OMOD_STATIC_DATA +static int bDoMarkMessages = 1; + typedef struct _instanceData { } instanceData; @@ -58,9 +64,8 @@ typedef struct _instanceData { * (and pre 1.20.2 releases of rsyslog) did in mark procesing. They simply * do not belong here. */ -rsRetVal -immark_runInput(void) -{ +BEGINrunInput +CODESTARTrunInput struct timeval tvSelectTimeout; sigset_t sigSet; sigfillset(&sigSet); @@ -81,7 +86,8 @@ dbgprintf("immark post select, doing mark, bFinished: %d\n", bFinished); } fprintf(stderr, "immark: finished!\n"); return RS_RET_OK; -} +ENDrunInput + BEGINfreeInstance CODESTARTfreeInstance @@ -107,6 +113,8 @@ ENDqueryEtryPt 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)); ENDmodInit #endif /* #if 0 */ /* |