summaryrefslogtreecommitdiffstats
path: root/plugins/imudp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-02 10:40:23 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-02 10:40:23 +0100
commit5402ba982fd8c9bb9ce7fab43ddabaa174ab0794 (patch)
tree812f534d2e39ccd345edac0975c732686b4d7ad5 /plugins/imudp
parenta16c60e782ebed11787e0b5dbd73e83797771b3c (diff)
downloadrsyslog-5402ba982fd8c9bb9ce7fab43ddabaa174ab0794.tar.gz
rsyslog-5402ba982fd8c9bb9ce7fab43ddabaa174ab0794.tar.xz
rsyslog-5402ba982fd8c9bb9ce7fab43ddabaa174ab0794.zip
bugfix: failed to compile on systems without epoll support
Diffstat (limited to 'plugins/imudp')
-rw-r--r--plugins/imudp/imudp.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 07a07d74..5c8e2859 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -377,11 +377,9 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
int maxfds;
int nfds;
int i;
+ fd_set readfds;
struct sockaddr_storage frominetPrev;
int bIsPermitted;
- uchar fromHost[NI_MAXHOST];
- uchar fromHostIP[NI_MAXHOST];
- uchar fromHostFQDN[NI_MAXHOST];
/* start "name caching" algo by making sure the previous system indicator
* is invalidated.
@@ -398,21 +396,21 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
* is given without -a, we do not need to listen at all..
*/
maxfds = 0;
- FD_ZERO (pReadfds);
+ FD_ZERO(&readfds);
/* Add the UDP listen sockets to the list of read descriptors. */
for (i = 0; i < *udpLstnSocks; i++) {
if (udpLstnSocks[i+1] != -1) {
if(Debug)
net.debugListenInfo(udpLstnSocks[i+1], "UDP");
- FD_SET(udpLstnSocks[i+1], pReadfds);
+ FD_SET(udpLstnSocks[i+1], &readfds);
if(udpLstnSocks[i+1]>maxfds) maxfds=udpLstnSocks[i+1];
}
}
if(Debug) {
dbgprintf("--------imUDP calling select, active file descriptors (max %d): ", maxfds);
for (nfds = 0; nfds <= maxfds; ++nfds)
- if ( FD_ISSET(nfds, pReadfds) )
+ if(FD_ISSET(nfds, &readfds))
dbgprintf("%d ", nfds);
dbgprintf("\n");
}
@@ -425,7 +423,7 @@ rsRetVal rcvMainLoop(thrdInfo_t *pThrd)
for(i = 0; nfds && i < *udpLstnSocks; i++) {
if(FD_ISSET(udpLstnSocks[i+1], &readfds)) {
processSocket(pThrd, udpLstnSocks[i+1], &frominetPrev, &bIsPermitted,
- fromHost, fromHostFQDN, fromHostIP, udpRulesets[i+1]);
+ udpRulesets[i+1]);
--nfds; /* indicate we have processed one descriptor */
}
}