app_queue: Fix multiple calls to a queue member that is in only one queue.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 8 Jan 2013 23:44:26 +0000 (23:44 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 8 Jan 2013 23:44:26 +0000 (23:44 +0000)
commit8ed2c74fe3f276bf658b3715eac2e7667f23e98c
tree2924fd3fe3ddb9083517f6067a2b32fb00c2f1c2
parent7d5345c9c0a26abc8462da0ef3029065d8793e23
app_queue: Fix multiple calls to a queue member that is in only one queue.

When ringinuse=no queue members can receive more than one call if these
calls happen at nearly the same time.

* Fix so a queue member does not receive more than one call from a queue.

NOTE: This fix does not prevent multiple calls to a member if the member
is in more than one queue.

* Did some refactoring to eliminate some code redundancy.

(issue ASTERISK-16115)
Reported by: nik600
Patches:
      jira_asterisk_16115_single_q_v1.8.patch (license #5621) patch uploaded by rmudgett
      Modified

* Revert the -r341580 and -r341599 changes adding the queues.conf
check_state_unknown option as it was added in an attempt to fix this
problem.  The fix did not need to be optional.  The fix should not have
tried to explicitly set the device state.  Setting the device state by
something other than the device introduces a race condition.  I also could
not see how the change would be effective other than delaying the
app_queue code long enough for the device state to propagate to app_queue.
........

Merged revisions 378663 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 378683 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 378687 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
CHANGES
UPGRADE.txt
apps/app_queue.c
configs/queues.conf.sample