aboutsummaryrefslogtreecommitdiffstats
path: root/net/asterisk/files/patch-res_res__agi.c
blob: 2e2f3c68a5eca653d641bfb170786d8e570b4bed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

$FreeBSD$

--- res/res_agi.c
+++ res/res_agi.c
@@ -969,7 +969,7 @@
        
        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);