diff options
author | sobomax <sobomax@FreeBSD.org> | 2007-07-27 08:28:45 +0800 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2007-07-27 08:28:45 +0800 |
commit | c93ef0a7467b0e90ee7df41f7ee0d4500284acf8 (patch) | |
tree | 6fa619387c2e06718463ea504a757065a27214bb /net/asterisk12 | |
parent | 7884f295b14662a9944fee39e6e70ca088c0541c (diff) | |
download | freebsd-ports-graphics-c93ef0a7467b0e90ee7df41f7ee0d4500284acf8.tar.gz freebsd-ports-graphics-c93ef0a7467b0e90ee7df41f7ee0d4500284acf8.tar.zst freebsd-ports-graphics-c93ef0a7467b0e90ee7df41f7ee0d4500284acf8.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/asterisk12')
-rw-r--r-- | net/asterisk12/Makefile | 1 | ||||
-rw-r--r-- | net/asterisk12/files/patch-channel.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/net/asterisk12/Makefile b/net/asterisk12/Makefile index f4a07ae31c5..4f1db3311d7 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 8b3c313ad9d..1c2e60452e2 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; |