]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
core show locks: display ThreadID in hexadecimal
authorAlec L Davis <sivad.a@paradise.net.nz>
Tue, 15 Mar 2011 00:26:09 +0000 (00:26 +0000)
committerAlec L Davis <sivad.a@paradise.net.nz>
Tue, 15 Mar 2011 00:26:09 +0000 (00:26 +0000)
Allow easier cross referencing of thread ID's with GDB backtraces

(closes issue #18968)
Reported by: alecdavis
Patches:
      bug18968.diff.txt uploaded by alecdavis (license 585)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@310779 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/utils.c

index 70c66547e90d6642c53efdebc85aebbbc5144ae6..e14d234d6647056ad31ba8c22593e62d9f20189e 100644 (file)
@@ -726,7 +726,7 @@ static int handle_show_locks(int fd, int argc, char *argv[])
        AST_LIST_TRAVERSE(&lock_infos, lock_info, entry) {
                int i;
                if (lock_info->num_locks) {
-                       ast_dynamic_str_append(&str, 0, "=== Thread ID: %ld (%s)\n", (long) lock_info->thread_id,
+                       ast_dynamic_str_append(&str, 0, "=== Thread ID: 0x%lx (%s)\n", (long) lock_info->thread_id,
                                lock_info->thread_name);
                        pthread_mutex_lock(&lock_info->lock);
                        for (i = 0; str && i < lock_info->num_locks; i++) {