mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user