aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 00:48:47 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 00:48:47 +0000
commit0763ed64425fc5a125e06fb92d47e84b91ac3bbc (patch)
tree53e9a6ec4fdde996cb24bfcbb408046c76966478
parente414addab5adcd079281cb36c72136e95c49693e (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@91074 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c
index 3dcb60feb..165353edd 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);