aboutsummaryrefslogtreecommitdiffstats
path: root/logger.c
diff options
context:
space:
mode:
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 0a397ff46..0cb0f06d0 100644
--- a/logger.c
+++ b/logger.c
@@ -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;
}