diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-04 10:27:45 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-04 10:27:45 +0000 |
commit | bc7d8ccebb0a9e7726a9c85cb10746d7407c28d8 (patch) | |
tree | d27718278d91f1de5170a97ce2dd30b69532da37 /modules.c | |
parent | cb71628f67e12081db2449eff83667e2a832f495 (diff) | |
download | rsyslog-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.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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); } |