Skip to content
Snippets Groups Projects
Commit 655b8f09 authored by Russell Bryant's avatar Russell Bryant
Browse files

Merged revisions 140816 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r140816 | russell | 2008-09-03 08:24:35 -0500 (Wed, 03 Sep 2008) | 4 lines

Don't freak out if the poll emulation receives NULL for the pollfds array
(closes issue #13307)
Reported by: jcovert

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent f1647375
No related branches found
No related tags found
No related merge requests found
......@@ -268,19 +268,19 @@ int poll
fd_set except_descs; /* exception descs */
struct timeval stime; /* select() timeout value */
int ready_descriptors; /* function result */
int max_fd; /* maximum fd value */
int max_fd = 0; /* maximum fd value */
struct timeval *pTimeout; /* actually passed */
FD_ZERO (&read_descs);
FD_ZERO (&write_descs);
FD_ZERO (&except_descs);
assert(pArray != (struct pollfd *) NULL);
/* Map the poll() file descriptor list in the select() data structures. */
max_fd = map_poll_spec(pArray, n_fds,
&read_descs, &write_descs, &except_descs);
if (pArray) {
max_fd = map_poll_spec (pArray, n_fds,
&read_descs, &write_descs, &except_descs);
}
/* Map the poll() timeout value in the select() timeout structure. */
pTimeout = map_timeout(timeout, &stime);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment