summaryrefslogtreecommitdiffstats
path: root/runtime/netstrm.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-29 12:21:52 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-29 12:21:52 +0200
commit1cce2e35b06b54469dd627454c0f58818ff3523a (patch)
tree42b836cda5c3f895949ced7e7afa4702271c6197 /runtime/netstrm.c
parent94acfb1c5f349ede619639e8cb84f2e3d3c28efe (diff)
downloadrsyslog-1cce2e35b06b54469dd627454c0f58818ff3523a.tar.gz
rsyslog-1cce2e35b06b54469dd627454c0f58818ff3523a.tar.xz
rsyslog-1cce2e35b06b54469dd627454c0f58818ff3523a.zip
removed loadbale module leak
- moved netstrms, netstrm and nssel into a single loadble module because they belong together - fixed "loadbale module leak"
Diffstat (limited to 'runtime/netstrm.c')
-rw-r--r--runtime/netstrm.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/runtime/netstrm.c b/runtime/netstrm.c
index bbb6ee30..e270335c 100644
--- a/runtime/netstrm.c
+++ b/runtime/netstrm.c
@@ -46,12 +46,9 @@
#include "module-template.h"
#include "obj.h"
#include "errmsg.h"
-//#include "nsd.h"
#include "netstrms.h"
#include "netstrm.h"
-MODULE_TYPE_LIB
-
/* static data */
DEFobjStaticHelpers
DEFobjCurrIf(errmsg)
@@ -119,6 +116,7 @@ AcceptConnReq(netstrm_t *pThis, netstrm_t **ppNew)
/* accept the new connection */
CHKiRet(pThis->Drvr.AcceptConnReq(pThis->pDrvrData, &pNewNsd));
/* construct our object so that we can use it... */
+ CHKiRet(objUse(netstrms, DONT_LOAD_LIB)); /* load netstrms obj if not already done so */
CHKiRet(netstrms.CreateStrm(pThis->pNS, ppNew));
(*ppNew)->pDrvrData = pNewNsd;
@@ -276,7 +274,7 @@ BEGINObjClassExit(netstrm, OBJ_IS_LOADABLE_MODULE) /* CHANGE class also in END M
CODESTARTObjClassExit(netstrm)
/* release objects we no longer need */
objRelease(errmsg, CORE_COMPONENT);
- objRelease(netstrms, LM_NETSTRMS_FILENAME);
+ objRelease(netstrms, DONT_LOAD_LIB);
ENDObjClassExit(netstrm)
@@ -287,33 +285,8 @@ ENDObjClassExit(netstrm)
BEGINAbstractObjClassInit(netstrm, 1, OBJ_IS_CORE_MODULE) /* class, version */
/* request objects we use */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
- CHKiRet(objUse(netstrms, LM_NETSTRMS_FILENAME));
/* set our own handlers */
ENDObjClassInit(netstrm)
-
-
-/* --------------- here now comes the plumbing that makes as a library module --------------- */
-
-
-BEGINmodExit
-CODESTARTmodExit
- netstrmClassExit();
-ENDmodExit
-
-
-BEGINqueryEtryPt
-CODESTARTqueryEtryPt
-CODEqueryEtryPt_STD_LIB_QUERIES
-ENDqueryEtryPt
-
-
-BEGINmodInit()
-CODESTARTmodInit
- *ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
-
- /* Initialize all classes that are in our module - this includes ourselfs */
- CHKiRet(netstrmClassInit(pModInfo)); /* must be done after tcps_sess, as we use it */
-ENDmodInit
/* vi:set ai:
*/