mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-17 16:20:43 +01:00
add freeWrkrInstance to output module interface
This commit is contained in:
parent
1960b94b8a
commit
64a4358384
@ -138,6 +138,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
static inline void
|
||||
setInstParamDefaults(instanceData *pData)
|
||||
{
|
||||
|
||||
@ -204,7 +204,7 @@ static rsRetVal freeWrkrInstance(void* pd)\
|
||||
wrkrInstanceData_t *pWrkrData;
|
||||
|
||||
#define CODESTARTfreeWrkrInstance \
|
||||
pWrkrData = (wrkrInstanceData_t*) pModData;
|
||||
pWrkrData = (wrkrInstanceData_t*) pd;
|
||||
|
||||
#define ENDfreeWrkrInstance \
|
||||
if(pWrkrData != NULL)\
|
||||
@ -511,6 +511,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
|
||||
#define CODEqueryEtryPt_STD_OMOD8_QUERIES \
|
||||
else if(!strcmp((char*) name, "createWrkrInstance")) {\
|
||||
*pEtryPoint = createWrkrInstance;\
|
||||
} else if(!strcmp((char*) name, "freeWrkrInstance")) {\
|
||||
*pEtryPoint = freeWrkrInstance;\
|
||||
}
|
||||
|
||||
/* the following definition is queryEtryPt block that must be added
|
||||
|
||||
@ -653,6 +653,7 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
|
||||
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"parseSelectorAct", &pNew->mod.om.parseSelectorAct));
|
||||
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"tryResume", &pNew->tryResume));
|
||||
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"createWrkrInstance", &pNew->mod.om.createWrkrInstance));
|
||||
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"freeWrkrInstance", &pNew->mod.om.freeWrkrInstance));
|
||||
|
||||
/* try load optional interfaces */
|
||||
localRet = (*pNew->modQueryEtryPt)((uchar*)"doHUP", &pNew->doHUP);
|
||||
|
||||
@ -139,7 +139,8 @@ struct modInfo_s {
|
||||
rsRetVal (*parseSelectorAct)(uchar**, void**,omodStringRequest_t**);
|
||||
rsRetVal (*newActInst)(uchar *modName, struct nvlst *lst, void **, omodStringRequest_t **);
|
||||
rsRetVal (*SetShutdownImmdtPtr)(void *pData, void *pPtr);
|
||||
rsRetVal (*createWrkrInstance)(void*pWrkrData, void*pData);
|
||||
rsRetVal (*createWrkrInstance)(void*ppWrkrData, void*pData);
|
||||
rsRetVal (*freeWrkrInstance)(void*pWrkrData);
|
||||
} om;
|
||||
struct { /* data for library modules */
|
||||
char dummy;
|
||||
|
||||
@ -96,6 +96,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINparseSelectorAct
|
||||
CODESTARTparseSelectorAct
|
||||
CODE_STD_STRING_REQUESTparseSelectorAct(0)
|
||||
|
||||
@ -941,6 +941,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINtryResume
|
||||
CODESTARTtryResume
|
||||
ENDtryResume
|
||||
|
||||
@ -369,6 +369,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINdbgPrintInstInfo
|
||||
CODESTARTdbgPrintInstInfo
|
||||
dbgprintf("%s", pData->target);
|
||||
|
||||
@ -296,6 +296,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINtryResume
|
||||
CODESTARTtryResume
|
||||
ENDtryResume
|
||||
|
||||
@ -89,6 +89,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINdbgPrintInstInfo
|
||||
CODESTARTdbgPrintInstInfo
|
||||
printf("%s", pData->progName);
|
||||
|
||||
@ -137,6 +137,11 @@ CODESTARTfreeInstance
|
||||
ENDfreeInstance
|
||||
|
||||
|
||||
BEGINfreeWrkrInstance
|
||||
CODESTARTfreeWrkrInstance
|
||||
ENDfreeWrkrInstance
|
||||
|
||||
|
||||
BEGINdbgPrintInstInfo
|
||||
register int i;
|
||||
CODESTARTdbgPrintInstInfo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user