append_event must be called while holding the session lock

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Nadi Sarrar 19 years ago
parent fecc14cd0f
commit 8adb217804

@ -2263,10 +2263,9 @@ int manager_event(int category, const char *event, const char *fmt, ...)
ast_dynamic_str_thread_append(&buf, 0, &manager_event_buf, "\r\n");
append_event(buf->str, category);
/* Append even to master list and wake up any sleeping sessions */
AST_LIST_LOCK(&sessions);
append_event(buf->str, category);
AST_LIST_TRAVERSE(&sessions, s, list) {
ast_mutex_lock(&s->__lock);
if (s->waiting_thread != AST_PTHREADT_NULL)

Loading…
Cancel
Save