summaryrefslogtreecommitdiffstats
path: root/runtime/obj.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-29 15:36:22 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-29 15:36:22 +0200
commit055d4ffc2afc77e03a3d31720d4a0998f8c3d92c (patch)
treebab872b075c24ba84f6658b5e339759af188591d /runtime/obj.c
parent1cce2e35b06b54469dd627454c0f58818ff3523a (diff)
downloadrsyslog-055d4ffc2afc77e03a3d31720d4a0998f8c3d92c.tar.gz
rsyslog-055d4ffc2afc77e03a3d31720d4a0998f8c3d92c.tar.xz
rsyslog-055d4ffc2afc77e03a3d31720d4a0998f8c3d92c.zip
fixed problem with module unload sequence
Diffstat (limited to 'runtime/obj.c')
-rw-r--r--runtime/obj.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/obj.c b/runtime/obj.c
index 18a4a726..312ed223 100644
--- a/runtime/obj.c
+++ b/runtime/obj.c
@@ -1192,15 +1192,14 @@ ReleaseObj(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf)
objInfo_t *pObjInfo;
- dbgprintf("source file %s requests object '%s', ifIsLoaded %d\n", srcFile, pObjName, pIf->ifIsLoaded);
+ dbgprintf("source file %s releasing object '%s', ifIsLoaded %d\n", srcFile, pObjName, pIf->ifIsLoaded);
if(pObjFile == NULL)
FINALIZE; /* if it is not a lodable module, we do not need to do anything... */
if(pIf->ifIsLoaded == 0) {
ABORT_FINALIZE(RS_RET_OK); /* we are not loaded - this is perfectly OK... */
- }
- if(pIf->ifIsLoaded == 2) {
+ } else if(pIf->ifIsLoaded == 2) {
pIf->ifIsLoaded = 0; /* clean up */
ABORT_FINALIZE(RS_RET_OK); /* we had a load error and can not continue */
}
@@ -1209,7 +1208,6 @@ ReleaseObj(char *srcFile, uchar *pObjName, uchar *pObjFile, interface_t *pIf)
CHKiRet(FindObjInfo(pStr, &pObjInfo));
/* if we reach this point, we have a valid pObjInfo */
- //if(pObjInfo->pModInfo != NULL) { /* NULL means core module */
module.Release(srcFile, &pObjInfo->pModInfo); /* decrease refcount */
pIf->ifIsLoaded = 0; /* indicated "no longer valid" */