diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 19:14:01 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-24 19:14:01 +0000 |
commit | 28f103ab4627c9fab8f834136aa9269f8b4e08f9 (patch) | |
tree | 144c128bf0d34459a0463ae2105b0289a96a4cd2 | |
parent | 709401939a46e3a9e7b5fdabedd3bab169f71947 (diff) |
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/branches/1.2@30033 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | logger.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -384,6 +384,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); @@ -490,6 +491,7 @@ int reload_logger(int rotate) } } ast_mutex_unlock(&loglock); + ast_mutex_unlock(&msglist_lock); return res; } |