Skip to content
Snippets Groups Projects
Commit ff2774d8 authored by Wenpeng Song's avatar Wenpeng Song Committed by Yalu Zhang
Browse files

Fix deadlock on 3-way closing and optimize a bit with codec sync (back port from devel)

- Fix the deadlock issue on 3-way closing.
  Inside the lock pvt_lock(sub->parent),ast_channel_lock(ast) after getting the rtp_stats is
  waiting for another lock from channel.c(ast_indicate_data) that coming in between to be
  unlocked. However, the lock of (ast_indicate_data) was waiting for the pvt_lock(sub->parent).
- Remove the extra 'unlock' in the function chan_brcm_modify_codec ast_channel_bridge_peer
  required to be unlocked which is not easy to handle here, so using AST_LIST_TRAVERSE instead.
- Optimized a bit with the condition for return in the function chan_brcm_modify_codec the
  condition for the incoming call that has no bridge at the time calling this function is not
  needed for now, as a default codec has been set based on the negotiated result when calling
  the local channel.
- Avoid future potential deadlock with the same reason around chan_brcm_modify_codec
parent 5ddddbe3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment