Skip to content
Snippets Groups Projects
Commit 353dd68c authored by Matt Jordan's avatar Matt Jordan Committed by Gerrit Code Review
Browse files

Merge "chan_sip: Prevent deadlock when performing BYE with Also transfer." into 11

parents 8b60998d d821f56b
No related branches found
No related tags found
No related merge requests found
...@@ -26986,11 +26986,14 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req) ...@@ -26986,11 +26986,14 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req)
if (bridged_to) { if (bridged_to) {
/* Don't actually hangup here... */ /* Don't actually hangup here... */
ast_queue_control(c, AST_CONTROL_UNHOLD); ast_queue_control(c, AST_CONTROL_UNHOLD);
sip_pvt_unlock(p);
ast_channel_unlock(c); /* async_goto can do a masquerade, no locks can be held during a masq */ ast_channel_unlock(c); /* async_goto can do a masquerade, no locks can be held during a masq */
ast_async_goto(bridged_to, p->context, p->refer->refer_to, 1); ast_async_goto(bridged_to, p->context, p->refer->refer_to, 1);
ast_channel_lock(c); ast_channel_lock(c);
} else sip_pvt_lock(p);
} else {
ast_queue_hangup(p->owner); ast_queue_hangup(p->owner);
}
} }
} else { } else {
ast_log(LOG_WARNING, "Invalid transfer information from '%s'\n", ast_sockaddr_stringify(&p->recv)); ast_log(LOG_WARNING, "Invalid transfer information from '%s'\n", ast_sockaddr_stringify(&p->recv));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment