From d0a93ad442331d12ee474ee859ee4fef5474b98f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 25 Jul 2007 16:50:12 +0000 Subject: introduced getWriteFDForSelect() module API --- syslogd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'syslogd.c') diff --git a/syslogd.c b/syslogd.c index c484c88b..a40930b0 100644 --- a/syslogd.c +++ b/syslogd.c @@ -5258,14 +5258,13 @@ static void mainloop(void) * scheduled to be replaced after the liblogging integration. * rgerhards 2005-07-20 */ + short fdMod; FD_ZERO(&writefds); for (f = Files; f != NULL ; f = f->f_next) { - if( (f->f_type == F_FORW) - && (f->f_un.f_forw.protocol == FORW_TCP) - && (TCPSendGetStatus(f) == TCP_SEND_CONNECTING)) { - FD_SET(f->f_file, &writefds); - if(f->f_file > maxfds) - maxfds = f->f_file; + if(f->pMod->getWriteFDForSelect(f, f->pModData, &fdMod) == RS_RET_OK) { + FD_SET(fdMod, &writefds); + if(fdMod > maxfds) + maxfds = fdMod; } } } -- cgit v1.2.3