From 7be75dbbc96bd3a4bccd88813fba088c310246c0 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Fri, 7 Dec 2007 21:17:24 +0000 Subject: [PATCH] Fix another bug in the DEBUG_THREADS code. The ast_mutex_init() function had the mutex attribute object marked as static. This means that multiple threads initializing locks at the same time could step on each other and end up with improperly initialized locks. (found when tracking down locking issues related to issue #11080) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@91828 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/lock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h index 6292398438..16ff071cb5 100644 --- a/include/asterisk/lock.h +++ b/include/asterisk/lock.h @@ -206,7 +206,7 @@ static inline int __ast_pthread_mutex_init(int track, const char *filename, int const char *mutex_name, ast_mutex_t *t) { int res; - static pthread_mutexattr_t attr; + pthread_mutexattr_t attr; #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS