mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
(closes issue #10427)
Reported by: pj Two of the three places ast_waitfor_nandfds could branch off to did not clear outfd and exception. If the calling function did not clear these there was a chance they could get a false positive on testing to see whether they were set. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1934,6 +1934,12 @@ static struct ast_channel *ast_waitfor_nandfds_complex(struct ast_channel **c, i
|
||||
struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, int nfds,
|
||||
int *exception, int *outfd, int *ms)
|
||||
{
|
||||
/* Clear all provided values in one place. */
|
||||
if (outfd)
|
||||
*outfd = -99999;
|
||||
if (exception)
|
||||
*exception = 0;
|
||||
|
||||
/* If no epoll file descriptor is available resort to classic nandfds */
|
||||
if (!n || nfds || c[0]->epfd == -1)
|
||||
return ast_waitfor_nandfds_classic(c, n, fds, nfds, exception, outfd, ms);
|
||||
|
Reference in New Issue
Block a user