[asterisk-commits] mmichelson: trunk r92324 - in /trunk: ./ apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 11 11:44:43 CST 2007
Author: mmichelson
Date: Tue Dec 11 11:44:42 2007
New Revision: 92324
URL: http://svn.digium.com/view/asterisk?view=rev&rev=92324
Log:
Merged revisions 92323 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r92323 | mmichelson | 2007-12-11 11:42:25 -0600 (Tue, 11 Dec 2007) | 10 lines
Fixing autofill to be more accurate. Specifically, if calls ahead of the current
caller were ringing members (but not yet bridged) there could be available members
and waiting callers who would not get matched up. The member availability checker
was correctly determining the number of available members in this scenario, but
the queue itself did not parallelly reflect this status on the pending calls. This
commit corrects the issue.
(closes issue #11459, reported by equissoftware, patched by me)
........
Modified:
trunk/ (props changed)
trunk/apps/app_queue.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=92324&r1=92323&r2=92324
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Dec 11 11:44:42 2007
@@ -324,6 +324,7 @@
time_t last_pos; /*!< Last time we told the user their position */
int opos; /*!< Where we started in the queue */
int handled; /*!< Whether our call was handled */
+ int pending; /*!< Non-zero if we are attempting to call a member */
int max_penalty; /*!< Limit the members that can take this call to this penalty or lower */
int linpos; /*!< If using linear strategy, what position are we at? */
int linwrapped; /*!< Is the linpos wrapped? */
@@ -2480,7 +2481,7 @@
ast_debug(1, "There are %d available members.\n", avl);
- while ((idx < avl) && (ch) && (ch != qe)) {
+ while ((idx < avl) && (ch) && !ch->pending && (ch != qe)) {
idx++;
ch = ch->next;
}
@@ -2907,6 +2908,7 @@
else
to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
orig = to;
+ ++qe->pending;
ring_one(qe, outgoing, &numbusies);
ao2_unlock(qe->parent);
if (use_weight)
@@ -2926,6 +2928,7 @@
ao2_unlock(qe->parent);
peer = lpeer ? lpeer->chan : NULL;
if (!peer) {
+ qe->pending = 0;
if (to) {
/* Must gotten hung up */
res = -1;
More information about the asterisk-commits
mailing list