[asterisk-bugs] [JIRA] (ASTERISK-23547) app_queue removing callers from queue when reloading
Italo Rossi (JIRA)
noreply at issues.asterisk.org
Thu Mar 27 10:09:18 CDT 2014
Italo Rossi created ASTERISK-23547:
--------------------------------------
Summary: app_queue removing callers from queue when reloading
Key: ASTERISK-23547
URL: https://issues.asterisk.org/jira/browse/ASTERISK-23547
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Applications/app_queue
Affects Versions: 11.8.1, 1.8.26.1
Reporter: Italo Rossi
Attachments: app_queue_fix_realtime_reload_1.8_trunk.patch
If you have only realtime members in queue 'sales', for example, and callers are waiting on this queue, when you do 'module reload app_queue.so' all the callers will be removed with EXITEMPTY reason.
The problem is when we reload app_queue, the function:
{code}
static int mark_member_dead(void *obj, void *arg, int flags)
{
struct member *member = obj;
if (!member->dynamic) {
member->delme = 1;
}
return 0;
}
{code}
is called and mark the static AND REALTIME members as dead.
At the same time, the remaining callers on queue are checking if there are available members through the function get_member_status. This functions iterate over all members of the queue and will return 0 if there are available members, or -1 if there's no members available.
If you have one realtime member with status inuse and the queue is configured with leavewhenempty=penalty,invalid, for example, the callers will join this queue and will keep waiting for an available member.
Before the reload, the get_member_status will always return 0, because there is one available member with status inuse, but when you reload the app_queue.so, the realtime member will be removed by mark_member_dead (and kill_dead_members) function and the callers waiting on queue will leave with reason EXITEMPTY because get_member_status doesn't iterate over members (there's no members at this time) and returns -1.
Patch attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list