From fa67273c1644551b50919fa7879acfdc92e269bc Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 7 Mar 2008 08:06:16 +0000 Subject: - added RSYSLOGD_MODDIR environment variable - added -M rsyslogd option (allows to specify module directory location) - converted net.c into a loadable library plugin --- tcpsrv.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tcpsrv.c') 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: -- cgit