summaryrefslogtreecommitdiffstats
path: root/plugins/imrelp/imrelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/imrelp/imrelp.c')
-rw-r--r--plugins/imrelp/imrelp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c
index 06abde26..cf797447 100644
--- a/plugins/imrelp/imrelp.c
+++ b/plugins/imrelp/imrelp.c
@@ -137,10 +137,11 @@ static struct cnfparamblk inppblk =
* we will only see the hostname (twice). -- rgerhards, 2009-10-14
*/
static relpRetVal
-onSyslogRcv(uchar *pHostname, uchar *pIP, uchar *msg, size_t lenMsg)
+onSyslogRcv(void *pUsr, uchar *pHostname, uchar *pIP, uchar *msg, size_t lenMsg)
{
prop_t *pProp = NULL;
msg_t *pMsg;
+ instanceConf_t *inst = (instanceConf_t*) pUsr;
DEFiRet;
CHKiRet(msgConstruct(&pMsg));
@@ -239,7 +240,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst)
CHKiRet(relpEngineSetDbgprint(pRelpEngine, dbgprintf));
CHKiRet(relpEngineSetFamily(pRelpEngine, glbl.GetDefPFFamily()));
CHKiRet(relpEngineSetEnableCmd(pRelpEngine, (uchar*) "syslog", eRelpCmdState_Required));
- CHKiRet(relpEngineSetSyslogRcv(pRelpEngine, onSyslogRcv));
+ CHKiRet(relpEngineSetSyslogRcv2(pRelpEngine, onSyslogRcv));
if (!glbl.GetDisableDNS()) {
CHKiRet(relpEngineSetDnsLookupMode(pRelpEngine, 1));
}
@@ -255,6 +256,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst)
if(inst->dhBits) {
relpSrvSetDHBits(pSrv, inst->dhBits);
}
+ relpSrvSetUsrPtr(pSrv, inst);
relpSrvSetGnuTLSPriString(pSrv, (char*)inst->pristring);
if(relpSrvSetCACert(pSrv, (char*) inst->caCertFile) != RELP_RET_OK)
ABORT_FINALIZE(RS_RET_RELP_ERR);