Merged revisions 84274 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84274 | dhubbard | 2007-10-01 16:25:37 -0500 (Mon, 01 Oct 2007) | 1 line

moved get_base_channel() code from action_redirect to ast_channel_masquerade() for issue 7706 and BE-160
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Dwayne M. Hubbard
2007-10-01 21:31:16 +00:00
parent 9334e72e76
commit 71a0672560
3 changed files with 14 additions and 23 deletions

View File

@@ -3333,7 +3333,7 @@ int ast_channel_make_compatible(struct ast_channel *chan, struct ast_channel *pe
int ast_channel_masquerade(struct ast_channel *original, struct ast_channel *clone)
{
int res = -1;
struct ast_channel *final_orig, *final_clone;
struct ast_channel *final_orig, *final_clone, *base;
retrymasq:
final_orig = original;
@@ -3353,6 +3353,10 @@ retrymasq:
if (clone->_bridge && (clone->_bridge != ast_bridged_channel(clone)) && (clone->_bridge->_bridge != clone))
final_clone = clone->_bridge;
if (final_clone->tech->get_base_channel && (base = final_clone->tech->get_base_channel(final_clone))) {
final_clone = base;
}
if ((final_orig != original) || (final_clone != clone)) {
/* Lots and lots of deadlock avoidance. The main one we're competing with