summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-12-08 13:31:55 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2008-12-08 13:31:55 +0100
commit128edc1598a13c894fe3853673d1231b9feafc39 (patch)
treea34dfbc9ed94fd0a952f2f8517b256c21196c706
parent8b7649fcda9eb15951dcad7728220228b7e29303 (diff)
downloadrsyslog-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--ChangeLog3
-rw-r--r--plugins/imudp/imudp.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c6bc46d0..0ebc2eef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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() */
}