[asterisk-commits] rmudgett: trunk r320058 - in /trunk: ./ main/channel.c main/features.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 20 11:46:07 CDT 2011
Author: rmudgett
Date: Fri May 20 11:46:02 2011
New Revision: 320058
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=320058
Log:
Merged revisions 320057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r320057 | rmudgett | 2011-05-20 11:43:02 -0500 (Fri, 20 May 2011) | 19 lines
Crash while transferring a call during DTMF feature timeout.
When a call is being attended transferred during the time between
AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END, the transferred channel
becomes a zombie (so tech data is not available), making ast_dtmf_stream()
segfault when it tries to send the DTMF digit (at least with SIP
channels).
Patch based on feature-end-zombie.patch uploaded by Irontec (license 1256)
* Check for zombies when ast_channel_bridge() returns.
* Guarantee that the fo parameter value is initialized in
ast_channel_bridge() before any returns.
(closes issue #19116)
Reported by: Irontec
Tested by: rmudgett
........
Modified:
trunk/ (props changed)
trunk/main/channel.c
trunk/main/features.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=320058&r1=320057&r2=320058
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Fri May 20 11:46:02 2011
@@ -7272,6 +7272,8 @@
char caller_warning = 0;
char callee_warning = 0;
+ *fo = NULL;
+
if (c0->_bridge) {
ast_log(LOG_WARNING, "%s is already in a bridge with %s\n",
c0->name, c0->_bridge->name);
@@ -7296,9 +7298,6 @@
ast_log(LOG_WARNING, "failed to copy native formats\n");
return -1;
}
-
-
- *fo = NULL;
if (ast_tvzero(config->start_time)) {
config->start_time = ast_tvnow();
Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=320058&r1=320057&r2=320058
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Fri May 20 11:46:02 2011
@@ -3660,7 +3660,17 @@
struct ast_channel *other; /* used later */
res = ast_channel_bridge(chan, peer, config, &f, &who);
-
+
+ if (ast_test_flag(chan, AST_FLAG_ZOMBIE)
+ || ast_test_flag(peer, AST_FLAG_ZOMBIE)) {
+ /* Zombies are present time to leave! */
+ res = -1;
+ if (f) {
+ ast_frfree(f);
+ }
+ goto before_you_go;
+ }
+
/* When frame is not set, we are probably involved in a situation
where we've timed out.
When frame is set, we'll come this code twice; once for DTMF_BEGIN
More information about the asterisk-commits
mailing list