mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-30 13:00:38 +00:00
Use poll() instead of select() to remove limits on open file descriptors.
This commit is contained in:
1 parent
0f38fa05a6
commit
b842bc97bb
10 files changed
+216
-137
No files matched your search
-19
@@ -570,25 +570,6 @@ char *print_mac(char *buff, unsigned char *mac, int len)
|
||||
return buff;
|
||||
}
|
||||
|
||||
void bump_maxfd(fd_set *set, int fd, int *max)
|
||||
{
|
||||
#ifdef FD_SETSIZE
|
||||
if (fd >= FD_SETSIZE)
|
||||
{
|
||||
static int logged = 0;
|
||||
if (!logged)
|
||||
my_syslog(LOG_ERR, _("File descriptor overflows FD_SET"));
|
||||
logged = 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
FD_SET(fd, set);
|
||||
if (fd > *max)
|
||||
*max = fd;
|
||||
}
|
||||
}
|
||||
|
||||
/* rc is return from sendto and friends.
|
||||
Return 1 if we should retry.
|
||||
Set errno to zero if we succeeded. */
|
||||
|
||||
Reference in new issue
Block a user