aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 15:26:09 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-24 15:26:09 +0000
commit55cfaf4064cb8c70c0ad1ce86691b49a6c007e97 (patch)
tree21b1afcc01f83ce9dec22fc503cec12b71919f91 /channels
parente0fefc85e31fb975c65d9d9e581c0701f95e2e61 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@288746 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_local.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index da133393c..6caf98a73 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);