]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_queue: Fix queues randomly disappearing on reload 22/4822/2
authorkkm <kkm@smartaction.com>
Wed, 25 Jan 2017 04:31:38 +0000 (20:31 -0800)
committerkkm <kkm@smartaction.com>
Fri, 27 Jan 2017 02:11:18 +0000 (18:11 -0800)
commitbe92f10a16aaa575a91c00b065abd9562b0cc133
tree11c13c576ee728dd5f92c52a62a16896c1655ac9
parent3410000948f406a2e4bba33842345c40eb9bee20
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