diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 10:30:06 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 10:30:06 +0000 |
commit | 545346e697fe930b8b7b9bd0ede47890b26a4832 (patch) | |
tree | d0cfea13a087e00238107347dd3ffb7b9e20f31e /tcpsrv.c | |
parent | 89fac41d646711e40a0549dfc197cdd7a7d5f18c (diff) | |
download | rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.tar.gz rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.tar.bz2 rsyslog-545346e697fe930b8b7b9bd0ede47890b26a4832.zip |
- changed modules.c calling conventions to be interface-based
- moved module loader from conf.c to module.c, where it belongs
- made the necessary plumbing to auto-load library modules
- upgraded debug system to include iRet in function exit message
- changed module interface so that instances need only to be supported by
output plugins (if we actually need them for input plugins, we can
always add it again...)
- milestone: first implementation of library modules (but do not get
unloaded on exit/hup so far)
Diffstat (limited to 'tcpsrv.c')
-rw-r--r-- | tcpsrv.c | 28 |
1 files changed, 26 insertions, 2 deletions
@@ -63,6 +63,7 @@ #include "tcpsrv.h" #include "obj.h" +MODULE_TYPE_LIB /* defines */ #define TCPSESS_MAX_DEFAULT 200 /* default for nbr of tcp sessions if no number is given */ @@ -801,8 +802,7 @@ ENDobjQueryInterface(tcpsrv) * before anything else is called inside this class. * rgerhards, 2008-02-29 */ -//BEGINObjClassInit(tcpsrv, 1, OBJ_IS_LOADABLE_MODULE) /* class, version - CHANGE class also in END MACRO! */ -BEGINObjClassInit(tcpsrv, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANGE class also in END MACRO! */ +BEGINObjClassInit(tcpsrv, 1, OBJ_IS_LOADABLE_MODULE) /* class, version - CHANGE class also in END MACRO! */ /* request objects we use */ CHKiRet(objUse(tcps_sess, "tcps_sess")); CHKiRet(objUse(conf, CORE_COMPONENT)); @@ -813,6 +813,30 @@ BEGINObjClassInit(tcpsrv, 1, OBJ_IS_CORE_MODULE) /* class, version - CHANGE clas ENDObjClassInit(tcpsrv) +/* --------------- here now comes the plumbing that makes as a library module --------------- */ + + +BEGINmodExit +CODESTARTmodExit +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(tcps_sessClassInit()); + CHKiRet(tcpsrvClassInit()); /* must be done after tcps_sess, as we use it */ + + /* request objects we use */ +ENDmodInit /* vim:set ai: */ |