From 3899f4f330b0bd86a47e982824a078fa0ebf42ad Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 6 Mar 2008 10:19:05 +0000 Subject: bugfix (yesterday's bug): abort during hup if library module was loaded --- modules.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'modules.c') diff --git a/modules.c b/modules.c index ffedc644..21141031 100644 --- a/modules.c +++ b/modules.c @@ -407,12 +407,17 @@ static rsRetVal modUnloadAndDestructDynamic(void) pModCurr = pMod; pMod = GetNxt(pModCurr); /* get next */ /* now we can destroy the previous module */ - if(pModCurr->eLinkType != eMOD_LINK_STATIC) { - modUnlinkAndDestroy(pModCurr, pModPrev); + /* TODO: library modules are currently never unloaded! */ + if(pModCurr->eType == eMOD_LIB) { + dbgprintf("NOT unloading library module %s\n", modGetName(pModCurr)); } else { - pModPrev = pModCurr; /* don't delete, so this is the new prev ptr */ - } + if(pModCurr->eLinkType != eMOD_LINK_STATIC) { + modUnlinkAndDestroy(pModCurr, pModPrev); + } else { + pModPrev = pModCurr; /* don't delete, so this is the new prev ptr */ + } } + } RETiRet; } -- cgit v1.2.3