summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-06 10:19:05 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-06 10:19:05 +0000
commit3899f4f330b0bd86a47e982824a078fa0ebf42ad (patch)
tree615cf643ec6d25b5f79899d10d6bbb1d1ce65fb0 /modules.c
parent24fd07ebe66c56430ca8a752ad1703d29c2f9da4 (diff)
downloadrsyslog-3899f4f330b0bd86a47e982824a078fa0ebf42ad.tar.gz
rsyslog-3899f4f330b0bd86a47e982824a078fa0ebf42ad.tar.xz
rsyslog-3899f4f330b0bd86a47e982824a078fa0ebf42ad.zip
bugfix (yesterday's bug): abort during hup if library module was loaded
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 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;
}