aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-05 18:32:59 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-05 18:32:59 +0000
commit2a6c74c735c6347efaeac6c85de56d0963b7f7c3 (patch)
treef290721027e5ac2302482256b33f5082d21bb8e1 /channel.c
parent1ef81d9de374e12788b0e44c09cc32b6e20ebe9d (diff)
And of course return us as a winner
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2353 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 1f50afefb..a56dfd91e 100755
--- a/channel.c
+++ b/channel.c
@@ -893,8 +893,11 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds,
time(&now);
for (x=0;x<n;x++) {
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;
+ if (!winner)
+ winner = c[x];
+ }
for (y=0;y<AST_MAX_FDS;y++) {
if (c[x]->fds[y] > -1) {
if ((FD_ISSET(c[x]->fds[y], &rfds) || FD_ISSET(c[x]->fds[y], &efds)) && !winner) {