]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_queue: Fix queues randomly disappearing on reload 29/4829/2
authorkkm <kkm@smartaction.com>
Wed, 25 Jan 2017 04:31:38 +0000 (20:31 -0800)
committerKirill Katsnelson <kkm@smartaction.com>
Fri, 27 Jan 2017 02:21:15 +0000 (20:21 -0600)
commit8270d2436d927e6b5c9988538f665ada51b4f2dc
treeb213de6da25dc8220813de35a0dea5cc2ee67101
parent10631bb209ff4edd7f0c0ff203e4c846059d899c
app_queue: Fix queues randomly disappearing on reload

With 500+ queues and a reload every minute, a random queue disappears
upon reload. The cause is mususe of the 'dead' flag. Namely, all queues
were marked dead up front, and then "resurrected" by dropping this flag
for those found in the configuration. But a queue marked dead can be
removed also when control leaves the app entry point on a PBX thread.

With this change, the queue is marked only not found, and at the end of
reload only the queues that are still not found are actually marked as
dead, so the dead flag is never reset, and set only on positively dead
queues.

ASTERISK-26755

Change-Id: I3a4537aec9eb8d8aeeaa0193407e3523feb004bf
apps/app_queue.c