Fix deadlocks in chan_sip in REFER and BYE handling

This resolves several deadlocks in chan_sip relating to usage of
ast_channel_bridge_peer and improves accessibility of lock debugging
function calls.

Review: https://reviewboard.asterisk.org/r/2756/
(closes issue ASTERISK-22215)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2013-08-15 12:12:26 +00:00
parent e9ac63f9a9
commit 3f46d461bf
3 changed files with 162 additions and 93 deletions

View File

@@ -316,7 +316,22 @@ static inline void __dump_backtrace(struct ast_bt *bt, int canlog)
* \param this_lock_addr lock address to return lock information
* \since 1.6.1
*/
void log_show_lock(void *this_lock_addr);
void ast_log_show_lock(void *this_lock_addr);
/*!
* \brief Generate a lock dump equivalent to "core show locks".
*
* The lock dump generated is generally too large to be output by a
* single ast_verbose/log/debug/etc. call. Only ast_cli() handles it
* properly without changing BUFSIZ in logger.c.
*
* Note: This must be ast_free()d when you're done with it.
*
* \retval An ast_str containing the lock dump
* \retval NULL on error
* \since 12
*/
struct ast_str *ast_dump_locks(void);
/*!
* \brief retrieve lock info for the specified mutex