From 673814eac56faf7706e02fbeae75a7e16c4460a5 Mon Sep 17 00:00:00 2001 From: Jeremy McNamara Date: Sun, 11 Jan 2004 22:36:37 +0000 Subject: fix deadlock issues with astmm git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1957 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- astmm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'astmm.c') diff --git a/astmm.c b/astmm.c index ad022faed..4738d7af3 100755 --- a/astmm.c +++ b/astmm.c @@ -57,6 +57,7 @@ static struct ast_region { (((unsigned long)(a)) % SOME_PRIME) static ast_mutex_t reglock = AST_MUTEX_INITIALIZER; +static ast_mutex_t showmemorylock = AST_MUTEX_INITIALIZER; static inline void *__ast_alloc_region(size_t size, int which, const char *file, int lineno, const char *func) { @@ -227,7 +228,7 @@ static int handle_show_memory(int fd, int argc, char *argv[]) fn = argv[3]; /* try to lock applications list ... */ - ast_mutex_lock(®lock); + ast_mutex_lock(&showmemorylock); for (x=0;x