1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Fix a bug resulting in recording hanging up indefinitely when connection

to peer drops.
This commit is contained in:
Maxim Sobolev 2008-11-12 18:45:25 +00:00
parent ff55b7f331
commit 71a2718fce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=222780
8 changed files with 60 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.4.21.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/

View File

@ -0,0 +1,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);

View File

@ -7,7 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.4.21.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/

View File

@ -0,0 +1,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);

View File

@ -7,7 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.4.21.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/

View File

@ -0,0 +1,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);

View File

@ -7,7 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.4.21.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
http://ftp.digium.com/pub/asterisk/old-releases/

View File

@ -0,0 +1,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);