diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-09 12:25:00 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-09 12:25:00 +0100 |
commit | a0ba62cae90af309dc7b4b5b7e8b7580eba5e23b (patch) | |
tree | 32f2dd8b2ff441fb2c2e7670e0ef104d06d7b991 /plugins/mmnormalize | |
parent | a2730f88e137dd57504959d70a8b7842abce6d4d (diff) | |
download | rsyslog-a0ba62cae90af309dc7b4b5b7e8b7580eba5e23b.tar.gz rsyslog-a0ba62cae90af309dc7b4b5b7e8b7580eba5e23b.tar.bz2 rsyslog-a0ba62cae90af309dc7b4b5b7e8b7580eba5e23b.zip |
mmnormalize: convert to v8 omod interface
Diffstat (limited to 'plugins/mmnormalize')
-rw-r--r-- | plugins/mmnormalize/mmnormalize.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/mmnormalize/mmnormalize.c b/plugins/mmnormalize/mmnormalize.c index 7e25824a..f82836b1 100644 --- a/plugins/mmnormalize/mmnormalize.c +++ b/plugins/mmnormalize/mmnormalize.c @@ -9,7 +9,7 @@ * * File begun on 2010-01-01 by RGerhards * - * Copyright 2010-2012 Rainer Gerhards and Adiscon GmbH. + * Copyright 2010-2013 Rainer Gerhards and Adiscon GmbH. * * This file is part of rsyslog. * @@ -70,6 +70,10 @@ typedef struct _instanceData { ee_ctx ctxee; /**< context to be used for libee */ } instanceData; +typedef struct wrkrInstanceData { + instanceData *pData; +} wrkrInstanceData_t; + typedef struct configSettings_s { uchar *rulebase; /**< name of normalization rulebase to use */ int bUseRawMsg; /**< use %rawmsg% instead of %msg% */ @@ -139,6 +143,11 @@ CODESTARTcreateInstance ENDcreateInstance +BEGINcreateWrkrInstance +CODESTARTcreateWrkrInstance +ENDcreateWrkrInstance + + BEGINbeginCnfLoad CODESTARTbeginCnfLoad loadModConf = pModConf; @@ -181,6 +190,11 @@ CODESTARTfreeInstance ENDfreeInstance +BEGINfreeWrkrInstance +CODESTARTfreeWrkrInstance +ENDfreeWrkrInstance + + BEGINdbgPrintInstInfo CODESTARTdbgPrintInstInfo dbgprintf("mmnormalize\n"); @@ -207,14 +221,14 @@ CODESTARTdoAction * requires changes to the libraries. For now, we accept message * duplication. -- rgerhards, 2010-12-01 */ - if(pData->bUseRawMsg) { + if(pWrkrData->pData->bUseRawMsg) { getRawMsg(pMsg, &buf, &len); } else { buf = getMSG(pMsg); len = getMSGLen(pMsg); } str = es_newStrFromCStr((char*)buf, len); - r = ln_normalize(pData->ctxln, str, &event); + r = ln_normalize(pWrkrData->pData->ctxln, str, &event); if(r != 0) { DBGPRINTF("error %d during ln_normalize\n", r); MsgSetParseSuccess(pMsg, 0); @@ -338,6 +352,7 @@ ENDmodExit BEGINqueryEtryPt CODESTARTqueryEtryPt CODEqueryEtryPt_STD_OMOD_QUERIES +CODEqueryEtryPt_STD_OMOD8_QUERIES CODEqueryEtryPt_STD_CONF2_QUERIES CODEqueryEtryPt_STD_CONF2_OMOD_QUERIES ENDqueryEtryPt |