aboutsummaryrefslogtreecommitdiffstats
path: root/channel.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-20 22:45:47 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-20 22:45:47 +0000
commit1bde2425c6797a8a89112b840aa813672bda30e3 (patch)
tree3f840defde7546425d47f66552f24e7010fc35a4 /channel.c
parent6ef43c2854457136d87aec705fd1a9b78d171e93 (diff)
Fix timeout > 600000 on Linux x86-32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6836 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 655bac85f..dbfc98c5c 100755
--- a/channel.c
+++ b/channel.c
@@ -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);