mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 16:50:14 +00:00
We should lock the queue before we go making changes to member interface statuses.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@35669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3425,9 +3425,11 @@ static void reload_queues(void)
|
|||||||
} else
|
} else
|
||||||
ast_log(LOG_WARNING, "XXX Leaking a little memory :( XXX\n");
|
ast_log(LOG_WARNING, "XXX Leaking a little memory :( XXX\n");
|
||||||
} else {
|
} else {
|
||||||
|
ast_mutex_lock(&q->lock);
|
||||||
for (cur = q->members; cur; cur = cur->next)
|
for (cur = q->members; cur; cur = cur->next)
|
||||||
cur->status = ast_device_state(cur->interface);
|
cur->status = ast_device_state(cur->interface);
|
||||||
ql = q;
|
ql = q;
|
||||||
|
ast_mutex_unlock(&q->lock);
|
||||||
}
|
}
|
||||||
q = qn;
|
q = qn;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user