diff options
author | Mark Spencer <markster@digium.com> | 2005-10-20 22:45:47 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-10-20 22:45:47 +0000 |
commit | 5ef59963d018fd1ded4d0d7f920fb4babde301c2 (patch) | |
tree | 3f840defde7546425d47f66552f24e7010fc35a4 /channel.c | |
parent | 56135f210fbec8796e4becd185ea184fec421360 (diff) |
Fix timeout > 600000 on Linux x86-32
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-x | channel.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1325,7 +1325,20 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, } if (*ms > 0) start = ast_tvnow(); - res = poll(pfds, max, rms); + + if (sizeof(int) == 4) { + do { + int kbrms = rms; + if (kbrms > 600000) + kbrms = 600000; + res = poll(pfds, max, kbrms); + if (!res) + rms -= kbrms; + } while (!res && (rms > 0)); + } else { + res = poll(pfds, max, rms); + } + if (res < 0) { for (x=0; x < n; x++) ast_clear_flag(c[x], AST_FLAG_BLOCKING); |