From a4aea9fbd047362b9f8e19e4220af08175b9edf4 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 24 Sep 2010 15:26:09 +0000 Subject: [PATCH] Don't fail a masquerade if it is already being hung up This avoids noise on some Local channel situations where we don't use /n. Thanks to Alec Davis for the suggestion. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@288746 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_local.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_local.c b/channels/chan_local.c index da133393c6..6caf98a732 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -444,7 +444,7 @@ static int local_fixup(struct ast_channel *oldchan, struct ast_channel *newchan) p->chan = newchan; /* Do not let a masquerade cause a Local channel to be bridged to itself! */ - if (p->owner->_bridge == p->chan || p->chan->_bridge == p->owner) { + if (!ast_check_hangup(newchan) && (p->owner->_bridge == p->chan || p->chan->_bridge == p->owner)) { ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n"); ast_mutex_unlock(&p->lock); ast_queue_hangup(newchan); -- 2.47.2