summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
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 /tcpsrv.c
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 'tcpsrv.c')
-rw-r--r--tcpsrv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index f89923ca..5e544a04 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -74,6 +74,7 @@ DEFobjStaticHelpers
DEFobjCurrIf(conf)
DEFobjCurrIf(tcps_sess)
DEFobjCurrIf(errmsg)
+DEFobjCurrIf(net)
@@ -464,7 +465,7 @@ RUNLOG_VAR("%p", pThis->pUsr);
/* OK, we have a "good" index... */
/* get the host name */
- if(cvthname(&addr, fromHost, fromHostFQDN) != RS_RET_OK) {
+ if(net.cvthname(&addr, fromHost, fromHostFQDN) != RS_RET_OK) {
/* we seem to have something malicous - at least we
* are now told to discard the connection request.
* Error message has been generated by cvthname.
@@ -548,7 +549,7 @@ Run(tcpsrv_t *pThis)
*/
if (pThis->pSocksLstn[i+1] != -1) {
if(Debug)
- debugListenInfo(pThis->pSocksLstn[i+1], "TCP");
+ net.debugListenInfo(pThis->pSocksLstn[i+1], "TCP");
FD_SET(pThis->pSocksLstn[i+1], &readfds);
if(pThis->pSocksLstn[i+1]>maxfds) maxfds=pThis->pSocksLstn[i+1];
}
@@ -558,11 +559,8 @@ Run(tcpsrv_t *pThis)
while(iTCPSess != -1) {
int fdSess;
fdSess = pThis->pSessions[iTCPSess]->sock; // TODO: NOT CLEAN!, use method
-RUNLOG_VAR("%d", iTCPSess);
-RUNLOG_VAR("%d", fdSess);
dbgprintf("Adding TCP Session %d\n", fdSess);
FD_SET(fdSess, &readfds);
-RUNLOG;
if (fdSess>maxfds) maxfds=fdSess;
/* now get next... */
iTCPSess = TCPSessGetNxtSess(pThis, iTCPSess);
@@ -839,6 +837,7 @@ CODESTARTmodInit
/* request objects we use */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
+ CHKiRet(objUse(net, "net"));
ENDmodInit
/* vim:set ai: