[Asterisk-code-review] app queue: Member stuck as pending after forwarding previous... (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Wed Mar 15 17:33:31 CDT 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/5210 )

Change subject: app_queue: Member stuck as pending after forwarding previous call from queue
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/5210/1/apps/app_queue.c
File apps/app_queue.c:

PS1, Line 6946: 		if (member->status == AST_DEVICE_NOT_INUSE) {
              : 			pending_members_remove(member);
              : 		}
I think placing this here sets up the original race condition that pending_members is trying to resolve. If the member is being called from two different queues at the same time then given this patch it is possible for a member to be rung by the second caller even though it is currently on a call.

For instance, the first call adds the member to pending_members. The call gets answered by the member and then we get to this spot in the code. The member is removed from pending_members here because the device state has not been updated yet (still set to AST_DEVICE_NOT_INUSE), so then the second call will then ring the member even though the member is potentially currently on a call.


-- 
To view, visit https://gerrit.asterisk.org/5210
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8bf6df487b9bb35726c08049ff25cdad5e357727
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Robert Mordec <r.mordec at slican.pl>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list