mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix verbose logger queue so that list doesnt get touched without msglist_lock being held
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
logger.c
4
logger.c
@@ -455,8 +455,8 @@ void close_logger(void)
|
||||
{
|
||||
struct msglist *m, *tmp;
|
||||
|
||||
m = list;
|
||||
ast_mutex_lock(&msglist_lock);
|
||||
m = list;
|
||||
while(m) {
|
||||
if (m->msg) {
|
||||
free(m->msg);
|
||||
@@ -656,8 +656,8 @@ extern void ast_verbose(const char *fmt, ...)
|
||||
int ast_verbose_dmesg(void (*v)(const char *string, int opos, int replacelast, int complete))
|
||||
{
|
||||
struct msglist *m;
|
||||
m = list;
|
||||
ast_mutex_lock(&msglist_lock);
|
||||
m = list;
|
||||
while(m) {
|
||||
/* Send all the existing entries that we have queued (i.e. they're likely to have missed) */
|
||||
v(m->msg, 0, 0, 1);
|
||||
|
Reference in New Issue
Block a user