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

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


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

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:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Richard Mudgett: 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 12f09ec..6bc2e67 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8145,14 +8145,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/10052
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce
Gerrit-Change-Number: 10052
Gerrit-PatchSet: 1
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/344d6eb9/attachment.html>


More information about the asterisk-code-review mailing list