summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-04 10:27:45 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-04 10:27:45 +0000
commitbc7d8ccebb0a9e7726a9c85cb10746d7407c28d8 (patch)
treed27718278d91f1de5170a97ce2dd30b69532da37 /modules.c
parentcb71628f67e12081db2449eff83667e2a832f495 (diff)
downloadrsyslog-bc7d8ccebb0a9e7726a9c85cb10746d7407c28d8.tar.gz
rsyslog-bc7d8ccebb0a9e7726a9c85cb10746d7407c28d8.tar.xz
rsyslog-bc7d8ccebb0a9e7726a9c85cb10746d7407c28d8.zip
- changed module interface to support querying obj interface (stage work)
- changed module interface version, as the interface change is quite large
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules.c b/modules.c
index acc65f65..09ffca1a 100644
--- a/modules.c
+++ b/modules.c
@@ -95,10 +95,14 @@ rsRetVal queryHostEtryPt(uchar *name, rsRetVal (**pEtryPoint)())
if(!strcmp((char*) name, "regCfSysLineHdlr")) {
*pEtryPoint = regCfSysLineHdlr;
+ } else if(!strcmp((char*) name, "objGetObjInterface")) {
+ *pEtryPoint = objGetObjInterface;
+ } else {
+ *pEtryPoint = NULL; /* to be on the safe side */
+ ABORT_FINALIZE(RS_RET_ENTRY_POINT_NOT_FOUND);
}
- if(iRet == RS_RET_OK)
- iRet = (*pEtryPoint == NULL) ? RS_RET_NOT_FOUND : RS_RET_OK;
+finalize_it:
RETiRet;
}
@@ -224,9 +228,10 @@ rsRetVal doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)())
ABORT_FINALIZE(iRet);
}
- CHKiRet((*modInit)(1, &pNew->iIFVers, &pNew->modQueryEtryPt, queryHostEtryPt));
+RUNLOG_VAR("%p", queryHostEtryPt);
+ CHKiRet((*modInit)(CURR_MOD_IF_VERSION, &pNew->iIFVers, &pNew->modQueryEtryPt, queryHostEtryPt));
- if(pNew->iIFVers != 1) {
+ if(pNew->iIFVers != CURR_MOD_IF_VERSION) {
ABORT_FINALIZE(RS_RET_MISSING_INTERFACE);
}