summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorMichael Meckelein <mmeckelein@hq.adiscon.com>2007-08-22 10:49:32 +0000
committerMichael Meckelein <mmeckelein@hq.adiscon.com>2007-08-22 10:49:32 +0000
commitfb13c3a39850ba28bf28ae8aead9c80c180fc13f (patch)
tree53ac7c98ac9be1a540e70d7c584642aa0607b2fd /modules.c
parentd1a76e1bdfd1c61d0244a3860cf05211f2458ca2 (diff)
downloadrsyslog-fb13c3a39850ba28bf28ae8aead9c80c180fc13f.tar.gz
rsyslog-fb13c3a39850ba28bf28ae8aead9c80c180fc13f.tar.xz
rsyslog-fb13c3a39850ba28bf28ae8aead9c80c180fc13f.zip
applied patches which will be released under 1.19.1, changed doc for 1.19.1v1-19-1
release
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules.c b/modules.c
index da57a282..b17f7982 100644
--- a/modules.c
+++ b/modules.c
@@ -336,6 +336,31 @@ rsRetVal modUnloadAndDestructAll(void)
return iRet;
}
+
+
+rsRetVal modUnloadAndDestructDynamic(void)
+{
+ DEFiRet;
+ modInfo_t *pMod;
+ modInfo_t *pModPrev;
+
+ pLoadedModulesLast = NULL;
+
+ pMod = modGetNxt(NULL);
+ while(pMod != NULL) {
+ pModPrev = pMod;
+ pMod = modGetNxt(pModPrev); /* get next */
+ /* now we can destroy the previous module */
+ if(pModPrev->eLinkType != eMOD_LINK_STATIC) {
+ dbgprintf("Unloading module %s\n", modGetName(pModPrev));
+ moduleDestruct(pModPrev);
+ } else {
+ pLoadedModulesLast = pModPrev;
+ }
+ }
+
+ return iRet;
+}
/*
* vi:set ai:
*/