aboutsummaryrefslogtreecommitdiffstats
path: root/logger.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 19:16:07 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-24 19:16:07 +0000
commit24de8a5db948d6a7c8296d18e82902acafafc0f0 (patch)
treecfc5e47385745155987812eb007b8b3121226a24 /logger.c
parent2671db405173161636e8e6f1933d4d4ed932b485 (diff)
Merged revisions 30033 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r30033 | file | 2006-05-24 16:14:01 -0300 (Wed, 24 May 2006) | 2 lines Fix deadlock caused by a race condition in the logger when reloading (issue #7195 reported and fixed by softins) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30034 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'logger.c')
-rw-r--r--logger.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/logger.c b/logger.c
index 522a96b2d..e4673a718 100644
--- a/logger.c
+++ b/logger.c
@@ -385,6 +385,7 @@ int reload_logger(int rotate)
FILE *myf;
int x, res = 0;
+ ast_mutex_lock(&msglist_lock); /* to avoid deadlock */
ast_mutex_lock(&loglock);
if (eventlog)
fclose(eventlog);
@@ -491,6 +492,7 @@ int reload_logger(int rotate)
}
}
ast_mutex_unlock(&loglock);
+ ast_mutex_unlock(&msglist_lock);
return res;
}