summaryrefslogtreecommitdiffstats
path: root/plugins/imtcp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-07 08:06:16 +0000
commitfa67273c1644551b50919fa7879acfdc92e269bc (patch)
tree38e41ee526a4bcc19540047c56c93b2a7865ef36 /plugins/imtcp
parentae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664 (diff)
downloadrsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.gz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.tar.xz
rsyslog-fa67273c1644551b50919fa7879acfdc92e269bc.zip
- added RSYSLOGD_MODDIR environment variable
- added -M rsyslogd option (allows to specify module directory location) - converted net.c into a loadable library plugin
Diffstat (limited to 'plugins/imtcp')
-rw-r--r--plugins/imtcp/imtcp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c
index ca52d3c5..2da094a4 100644
--- a/plugins/imtcp/imtcp.c
+++ b/plugins/imtcp/imtcp.c
@@ -51,6 +51,7 @@ MODULE_TYPE_INPUT
DEF_IMOD_STATIC_DATA
DEFobjCurrIf(tcpsrv)
DEFobjCurrIf(tcps_sess)
+DEFobjCurrIf(net)
/* Module static data */
static tcpsrv_t *pOurTcpsrv = NULL; /* our TCP server(listener) TODO: change for multiple instances */
@@ -65,7 +66,7 @@ static int
isPermittedHost(struct sockaddr *addr, char *fromHostFQDN, void __attribute__((unused)) *pUsrSrv,
void __attribute__((unused)) *pUsrSess)
{
- return isAllowedSender(pAllowedSenders_TCP, addr, fromHostFQDN);
+ return isAllowedSender(net.pAllowedSenders_TCP, addr, fromHostFQDN);
}
@@ -159,7 +160,7 @@ ENDrunInput
BEGINwillRun
CODESTARTwillRun
/* first apply some config settings */
- PrintAllowedSenders(2); /* TCP */
+ net.PrintAllowedSenders(2); /* TCP */
if(pOurTcpsrv == NULL)
ABORT_FINALIZE(RS_RET_NO_RUN);
finalize_it:
@@ -169,9 +170,9 @@ ENDwillRun
BEGINafterRun
CODESTARTafterRun
/* do cleanup here */
- if (pAllowedSenders_TCP != NULL) {
- clearAllowedSenders (pAllowedSenders_TCP);
- pAllowedSenders_TCP = NULL;
+ if(net.pAllowedSenders_TCP != NULL) {
+ net.clearAllowedSenders(net.pAllowedSenders_TCP);
+ net.pAllowedSenders_TCP = NULL;
}
ENDafterRun
@@ -204,6 +205,7 @@ CODESTARTmodInit
CODEmodInit_QueryRegCFSLineHdlr
pOurTcpsrv = NULL;
/* request objects we use */
+ CHKiRet(objUse(net, "net"));
CHKiRet(objUse(tcps_sess, "tcpsrv"));
CHKiRet(objUse(tcpsrv, "tcpsrv"));