Hopefully, this will resolve the issues that russellb had with this log_show_lock().
authorSteve Murphy <murf@digium.com>
Tue, 22 Apr 2008 14:38:46 +0000 (14:38 +0000)
committerSteve Murphy <murf@digium.com>
Tue, 22 Apr 2008 14:38:46 +0000 (14:38 +0000)
commit161b4abd796ef2126135a2caef268b1ac54f91bb
treeb984c3a887dd7968073113d0ae18215bf43c91dc
parent41fd7a6a21fc870f75ceb219d130e0bd6519636c
Hopefully, this will resolve the issues that russellb had with this log_show_lock().
I gathered the code that filled the string, and put it in a different func which
I cryptically call "append_lock_information()".
Now, both log_show_lock(), and handle_show_locks() both call this code to do
the work. Tested, seems to work fine.
Also, log_show_lock was modified to use the ast_str stuff, along with checking
for successful ast_str creation, and freeing the ast_str obj when finished.
A break was inserted to terminate the search for the lock; we should never
see it twice.

An example usage in chan_sip.c was created as a comment, for instructional
purposes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
main/utils.c