Commit 40d68516 authored by Dafydd Harries's avatar Dafydd Harries

for clarity, make max_fd the largest fd when select()ing

darcs-hash:20070208141507-c9803-afabb4dd7ddbafa655b3602e3ee3631ff72b255f.gz
parent 7adc1e65
......@@ -834,14 +834,13 @@ nice_agent_poll_read (NiceAgent *agent, GSList *other_fds)
max_fd = MAX (fileno, max_fd);
}
max_fd++;
num_readable = select (max_fd, &fds, NULL, NULL, 0);
num_readable = select (max_fd + 1, &fds, NULL, NULL, 0);
if (num_readable < 1)
/* none readable, or error */
return NULL;
for (j = 0; j < max_fd; j++)
for (j = 0; j <= max_fd; j++)
if (FD_ISSET (j, &fds))
{
GSList *i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment