summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules.c b/modules.c
index e997eb40..b7ba6dd8 100644
--- a/modules.c
+++ b/modules.c
@@ -184,6 +184,7 @@ modInfo_t *omodGetNxt(modInfo_t *pThis)
static rsRetVal modUnload(modInfo_t *pThis)
{
DEFiRet;
+ void *pModCookie;
assert(pThis != NULL);
@@ -192,7 +193,9 @@ static rsRetVal modUnload(modInfo_t *pThis)
* CVS snapshot, be aware of this limitation. For now, you can just remove everything up to
* (but not including) the END DEVEL comment. That will do the trick. rgerhards, 2007-11-21
*/
-dbgprintf("we are now calling modExit()\n");
+ CHKiRet(pThis->modGetID(&pModCookie));
+dbgprintf("we are now calling modExit(), module id %x\n", pModCookie);
+ CHKiRet(unregCfSysLineHdlrs4Owner(pModCookie));
/* END DEVEL */
@@ -283,6 +286,10 @@ rsRetVal doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)())
moduleDestruct(pNew);
return iRet;
}
+ if((iRet = (*pNew->modQueryEtryPt)((uchar*)"modGetID", &pNew->modGetID)) != RS_RET_OK) {
+ moduleDestruct(pNew);
+ return iRet;
+ }
if((iRet = (*pNew->modQueryEtryPt)((uchar*)"modExit", &pNew->modExit)) != RS_RET_OK) {
moduleDestruct(pNew);
return iRet;