mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 06:00:36 +00:00
During hangup it is possible for p->chan or p->owner to be NULL, so just return what the channel is bridged to instead of what they are *really* bridged to. Thanks Matt Nicholson!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -183,8 +183,11 @@ static struct ast_channel *local_bridgedchannel(struct ast_channel *chan, struct
|
|||||||
bridged = (bridge == p->owner ? p->chan : p->owner);
|
bridged = (bridge == p->owner ? p->chan : p->owner);
|
||||||
|
|
||||||
/* Now see if the opposite channel is bridged to anything */
|
/* Now see if the opposite channel is bridged to anything */
|
||||||
if (bridged->_bridge)
|
if (!bridged) {
|
||||||
|
bridged = bridge;
|
||||||
|
} else if (bridged->_bridge) {
|
||||||
bridged = bridged->_bridge;
|
bridged = bridged->_bridge;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_mutex_unlock(&p->lock);
|
ast_mutex_unlock(&p->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user