Merged revisions 115737 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
r115737 | mmichelson | 2008-05-12 12:55:08 -0500 (Mon, 12 May 2008) | 15 lines

Merged revisions 115735 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115735 | mmichelson | 2008-05-12 12:51:14 -0500 (Mon, 12 May 2008) | 7 lines

If a thread holds no locks, do not print any information on the thread when issuing
a core show locks command. This will help to de-clutter output somewhat.

Russell said it would be fine to place this improvement in the 1.4 branch, so that's
why it's going here too.


........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@115738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2008-05-12 17:57:03 +00:00
parent fc07d2e1b7
commit bc90252b89

View File

@@ -749,6 +749,7 @@ static char *handle_show_locks(struct ast_cli_entry *e, int cmd, struct ast_cli_
pthread_mutex_lock(&lock_infos_lock.mutex);
AST_LIST_TRAVERSE(&lock_infos, lock_info, entry) {
int i;
if (lock_info->num_locks) {
ast_str_append(&str, 0, "=== Thread ID: %d (%s)\n", (int) lock_info->thread_id,
lock_info->thread_name);
pthread_mutex_lock(&lock_info->lock);
@@ -790,6 +791,7 @@ static char *handle_show_locks(struct ast_cli_entry *e, int cmd, struct ast_cli_
if (!str)
break;
}
}
pthread_mutex_unlock(&lock_infos_lock.mutex);
if (!str)