aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-11 16:51:27 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-11 16:51:27 +0000
commit19a1dd945dc4099dfc4d4fa01ee3cf78e568b386 (patch)
tree37b74c5d0bef7a24013d4fd9986dbfa6cfcf3074 /res
parent6b091d671d0474fd712103330b5548f7cc7b41cd (diff)
Don't wait forever, if there's a specified recording timeout.
(closes issue #13885) Reported by: bamby Patches: res_agi.c.patch uploaded by bamby (license 430) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@163088 f38db490-d61c-443f-a65b-d21fe96a405b
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 1119a2d61..40c15da82 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -970,7 +970,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);
fdprintf(agi->fd, "200 result=%d (waitfor) endpos=%ld\n", res,sample_offset);