[Asterisk-cvs] asterisk channel.c,1.247,1.248 rtp.c,1.149,1.150
markster
markster
Fri Oct 14 13:07:49 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv29359
Modified Files:
channel.c rtp.c
Log Message:
Make sure when the timeout occurs that we actually break the bridge (bug #5252)
Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -d -r1.247 -r1.248
--- channel.c 14 Oct 2005 00:46:13 -0000 1.247
+++ channel.c 14 Oct 2005 17:02:20 -0000 1.248
@@ -2974,12 +2974,16 @@
}
who = ast_waitfor_n(cs, 2, &toms);
if (!who) {
+ if (!toms) {
+ res = AST_BRIDGE_RETRY;
+ break;
+ }
ast_log(LOG_DEBUG, "Nobody there, continuing...\n");
if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE || c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE) {
if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
- c0->_softhangup = 0;
- if (c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
- c1->_softhangup = 0;
+ c0->_softhangup = 0;
+ if (c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
+ c1->_softhangup = 0;
c0->_bridge = c1;
c1->_bridge = c0;
}
@@ -3215,7 +3219,8 @@
ast_clear_flag(c0, AST_FLAG_NBRIDGE);
ast_clear_flag(c1, AST_FLAG_NBRIDGE);
}
-
+ if (res == AST_BRIDGE_RETRY)
+ continue;
switch (res) {
case AST_BRIDGE_RETRY:
/* continue; */
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- rtp.c 14 Oct 2005 00:03:41 -0000 1.149
+++ rtp.c 14 Oct 2005 17:02:20 -0000 1.150
@@ -1677,6 +1677,8 @@
}
who = ast_waitfor_n(cs, 2, &timeoutms);
if (!who) {
+ if (!timeoutms)
+ return AST_BRIDGE_RETRY;
if (option_debug)
ast_log(LOG_DEBUG, "Ooh, empty read...\n");
/* check for hangup / whentohangup */
More information about the svn-commits
mailing list