|
|
@ -893,8 +893,11 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds,
|
|
|
|
time(&now);
|
|
|
|
time(&now);
|
|
|
|
for (x=0;x<n;x++) {
|
|
|
|
for (x=0;x<n;x++) {
|
|
|
|
c[x]->blocking = 0;
|
|
|
|
c[x]->blocking = 0;
|
|
|
|
if (havewhen && c[x]->whentohangup && (now > c[x]->whentohangup))
|
|
|
|
if (havewhen && c[x]->whentohangup && (now > c[x]->whentohangup)) {
|
|
|
|
c[x]->_softhangup |= AST_SOFTHANGUP_TIMEOUT;
|
|
|
|
c[x]->_softhangup |= AST_SOFTHANGUP_TIMEOUT;
|
|
|
|
|
|
|
|
if (!winner)
|
|
|
|
|
|
|
|
winner = c[x];
|
|
|
|
|
|
|
|
}
|
|
|
|
for (y=0;y<AST_MAX_FDS;y++) {
|
|
|
|
for (y=0;y<AST_MAX_FDS;y++) {
|
|
|
|
if (c[x]->fds[y] > -1) {
|
|
|
|
if (c[x]->fds[y] > -1) {
|
|
|
|
if ((FD_ISSET(c[x]->fds[y], &rfds) || FD_ISSET(c[x]->fds[y], &efds)) && !winner) {
|
|
|
|
if ((FD_ISSET(c[x]->fds[y], &rfds) || FD_ISSET(c[x]->fds[y], &efds)) && !winner) {
|
|
|
|