diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-12-08 13:31:55 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-12-08 13:31:55 +0100 |
commit | 128edc1598a13c894fe3853673d1231b9feafc39 (patch) | |
tree | a34dfbc9ed94fd0a952f2f8517b256c21196c706 | |
parent | 8b7649fcda9eb15951dcad7728220228b7e29303 (diff) | |
download | rsyslog-128edc1598a13c894fe3853673d1231b9feafc39.tar.gz rsyslog-128edc1598a13c894fe3853673d1231b9feafc39.tar.xz rsyslog-128edc1598a13c894fe3853673d1231b9feafc39.zip |
bugfix: imudp went into an endless loop under some circumstances
(but could also leave it under some other circumstances...)
Thanks to David Lang and speedfox for reporting this issue.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | plugins/imudp/imudp.c | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,6 @@ +- bugfix: imudp went into an endless loop under some circumstances + (but could also leave it under some other circumstances...) + Thanks to David Lang and speedfox for reporting this issue. --------------------------------------------------------------------------- Version 4.1.2 [DEVEL] (rgerhards), 2008-12-04 - bugfix: code did not compile without zlib diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 037da56d..0193ac06 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -297,12 +297,12 @@ CODESTARTrunInput /* wait for io to become ready */ nfds = select(maxfds+1, (fd_set *) &readfds, NULL, NULL, NULL); - for (i = 0; nfds && i < *udpLstnSocks; i++) { - if (FD_ISSET(udpLstnSocks[i+1], &readfds)) { + for(i = 0; nfds && i < *udpLstnSocks; i++) { + if(FD_ISSET(udpLstnSocks[i+1], &readfds)) { processSocket(udpLstnSocks[i+1], &frominetPrev, &bIsPermitted, fromHost, fromHostFQDN, fromHostIP); - } --nfds; /* indicate we have processed one descriptor */ + } } /* end of a run, back to loop for next recv() */ } |