Merge "app_queue: Fix old confusing comment about when the members are called"

This commit is contained in:
Friendly Automation 2019-12-06 13:33:26 -06:00 committed by Gerrit Code Review
commit 616f702865

View file

@ -6850,8 +6850,7 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
tmp->lastcall = cur->lastcall; tmp->lastcall = cur->lastcall;
tmp->lastqueue = cur->lastqueue; tmp->lastqueue = cur->lastqueue;
ast_copy_string(tmp->interface, cur->interface, sizeof(tmp->interface)); ast_copy_string(tmp->interface, cur->interface, sizeof(tmp->interface));
/* Special case: If we ring everyone, go ahead and ring them, otherwise /* Calculate the metric for the appropriate strategy. */
just calculate their metric for the appropriate strategy */
if (!calc_metric(qe->parent, cur, x++, qe, tmp)) { if (!calc_metric(qe->parent, cur, x++, qe, tmp)) {
/* Put them in the list of outgoing thingies... We're ready now. /* Put them in the list of outgoing thingies... We're ready now.
XXX If we're forcibly removed, these outgoing calls won't get XXX If we're forcibly removed, these outgoing calls won't get
@ -6887,6 +6886,7 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
orig = to; orig = to;
++qe->pending; ++qe->pending;
ao2_unlock(qe->parent); ao2_unlock(qe->parent);
/* Call the queue members with the best metric now. */
ring_one(qe, outgoing, &numbusies); ring_one(qe, outgoing, &numbusies);
lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies,
ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT),