[Asterisk-code-review] app queue: Update realtime queuemembers after wait a bit(), ... (asterisk[15])

Joshua Colp asteriskteam at digium.com
Fri Sep 7 04:48:54 CDT 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/10036 )

Change subject: app_queue: Update realtime queuemembers after wait_a_bit(), not before
......................................................................

app_queue: Update realtime queuemembers after wait_a_bit(), not before

This ensures the most up-to-date information is used for the next
call attempt.

ASTERISK-28032

Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce
---
M apps/app_queue.c
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Joshua Colp: Approved for Submit



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 292fad2..32a979e 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8332,14 +8332,15 @@
 			break;
 		}
 
-		/* If using dynamic realtime members, we should regenerate the member list for this queue */
-		update_realtime_members(qe.parent);
 		/* OK, we didn't get anybody; wait for 'retry' seconds; may get a digit to exit with */
 		res = wait_a_bit(&qe);
 		if (res) {
 			goto stop;
 		}
 
+		/* If using dynamic realtime members, we should regenerate the member list for this queue */
+		update_realtime_members(qe.parent);
+
 		/* Since this is a priority queue and
 		 * it is not sure that we are still at the head
 		 * of the queue, go and check for our turn again.

-- 
To view, visit https://gerrit.asterisk.org/10036
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce
Gerrit-Change-Number: 10036
Gerrit-PatchSet: 2
Gerrit-Owner: lvl <digium at lvlconsultancy.nl>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180907/c89ea9d7/attachment.html>


More information about the asterisk-code-review mailing list