summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2007-07-27 00:28:45 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2007-07-27 00:28:45 +0000
commite8ebf11a7fb69956138393121767e79206c3c6ca (patch)
tree099a10c6e2db1015a2c1fc26a5d32a328bc25fe0 /net
parent87290c886dd93aa7f7ff8b75c55b10f1eca9a6d5 (diff)
downloadfreebsd-ports-e8ebf11a7fb69956138393121767e79206c3c6ca.zip
Fix a critical bug in the channel code, which can result in a thread
going into infinite loop on hangup. This bug is already fixed in 1.4.x. Bump PORTREVISION. Sponsored by: Sippy Software, Inc. ( http://www.sippysoft.com/ )
Diffstat (limited to 'net')
-rw-r--r--net/asterisk12/Makefile1
-rw-r--r--net/asterisk12/files/patch-channel.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/net/asterisk12/Makefile b/net/asterisk12/Makefile
index f4a07ae31c5f..4f1db3311d70 100644
--- a/net/asterisk12/Makefile
+++ b/net/asterisk12/Makefile
@@ -7,6 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.2.17
+PORTREVISION= 1
PKGNAMESUFFIX= 12
CATEGORIES= net
MASTER_SITES= http://ftp.digium.com/pub/asterisk/ \
diff --git a/net/asterisk12/files/patch-channel.c b/net/asterisk12/files/patch-channel.c
index 8b3c313ad9d5..1c2e60452e2a 100644
--- a/net/asterisk12/files/patch-channel.c
+++ b/net/asterisk12/files/patch-channel.c
@@ -12,3 +12,16 @@ $FreeBSD$
#endif /* __linux__ */
#ifndef ZT_TIMERPING
#error "You need newer zaptel! Please svn update zaptel"
+@@ -1564,6 +1564,12 @@
+ if (!havewhen)
+ time(&now);
+ diff = c[x]->whentohangup - now;
++ if (diff < 1) {
++ /* Should already be hungup */
++ c[x]->_softhangup |= AST_SOFTHANGUP_TIMEOUT;
++ ast_mutex_unlock(&c[x]->lock);
++ return c[x];
++ }
+ if (!havewhen || (diff < whentohangup)) {
+ havewhen++;
+ whentohangup = diff;