mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-25 07:01:09 +00:00
Fix timeout > 600000 on Linux x86-32
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
channel.c
13
channel.c
@@ -1325,7 +1325,20 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds,
|
|||||||
}
|
}
|
||||||
if (*ms > 0)
|
if (*ms > 0)
|
||||||
start = ast_tvnow();
|
start = ast_tvnow();
|
||||||
|
|
||||||
|
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);
|
res = poll(pfds, max, rms);
|
||||||
|
}
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
for (x=0; x < n; x++)
|
for (x=0; x < n; x++)
|
||||||
ast_clear_flag(c[x], AST_FLAG_BLOCKING);
|
ast_clear_flag(c[x], AST_FLAG_BLOCKING);
|
||||||
|
Reference in New Issue
Block a user