From: Russell Bryant Date: Wed, 5 Dec 2007 00:48:47 +0000 (+0000) Subject: When DEBUG_THREADS is enabled, we only have the details about who is holding X-Git-Tag: 1.4.16~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=82257a7e33f0cca8376b3dc05e69682321d5ddeb;p=thirdparty%2Fasterisk.git When DEBUG_THREADS is enabled, we only have the details about who is holding a lock that we are waiting on for a mutex, not rwlocks. This should fix the problem where people have reported "core show locks" crashing sometimes. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91074 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/utils.c b/main/utils.c index 3dcb60feb4..165353edd6 100644 --- a/main/utils.c +++ b/main/utils.c @@ -743,6 +743,10 @@ static int handle_show_locks(int fd, int argc, char *argv[]) if (!lock_info->locks[i].pending) continue; + /* We only have further details for mutexes right now */ + if (lock_info->locks[i].type != AST_MUTEX) + continue; + lock = lock_info->locks[i].lock_addr; ast_reentrancy_lock(lock);