aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index e656ff3f9..ae6c3196d 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1334,7 +1334,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
start = ast_tvnow();
while ((ms < 0) || ast_tvdiff_ms(ast_tvnow(), start) < ms) {
- res = ast_waitfor(chan, -1);
+ res = ast_waitfor(chan, ms - ast_tvdiff_ms(ast_tvnow(), start));
if (res < 0) {
ast_closestream(fs);
ast_agi_send(agi->fd, chan, "200 result=%d (waitfor) endpos=%ld\n", res,sample_offset);