[asterisk-bugs] [JIRA] (ASTERISK-28644) Stale comment in app_queue about ring_entry exception

Walter Doekes (JIRA) noreply at issues.asterisk.org
Wed Dec 4 03:39:32 CST 2019


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248952#comment-248952 ] 

Walter Doekes commented on ASTERISK-28644:
------------------------------------------

Done (for master. Let me know if you want it cherry-picked to other branches).

> Stale comment in app_queue about ring_entry exception
> -----------------------------------------------------
>
>                 Key: ASTERISK-28644
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28644
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_queue
>    Affects Versions: 16.6.1
>            Reporter: Walter Doekes
>            Assignee: Walter Doekes
>            Severity: Trivial
>
> {noformat}
> commit 465a7518ccf06550b131e6dae8e41eaa4243c1ba
> Author: Mark Spencer <markster at digium.com>
> Date:   Wed Aug 13 18:58:01 2003 +0000
>     Do the right thing with ringall queues with entries that have penalties
> {noformat}
> {noformat}
> @@ -738,10 +749,7 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
>                 }
>                 /* Special case: If we ring everyone, go ahead and ring them, otherwise
>                    just calculate their metric for the appropriate strategy */
> -               if (!qe->parent->strategy)
> -                       ring_entry(qe, tmp);
> -               else
> -                       calc_metric(qe->parent, cur, x++, qe, tmp);
> +               calc_metric(qe->parent, cur, x++, qe, tmp);
>                 /* Put them in the list of outgoing thingies...  We're ready now. 
>                    XXX If we're forcibly removed, these outgoing calls won't get
>                    hung up XXX */
> {noformat}
> Looks like that comment should've been removed.
> The ring_entry() is now done a bit later on, and is seemingly unrelated to this comment.
> It's still here, confusing the reader:
> {noformat}
> $ git log --format=oneline -1 origin/master 
> c1ad1ea39147b77b786c10fee24af7912920551f (origin/master, origin/HEAD) Merge "media_cache.c: Various CLI improvements"
> $ git show origin/master:apps/app_queue.c | grep 'go ahead and ring them' -A13
> 		/* Special case: If we ring everyone, go ahead and ring them, otherwise
> 		   just calculate their metric for the appropriate strategy */
> 		if (!calc_metric(qe->parent, cur, x++, qe, tmp)) {
> 			/* Put them in the list of outgoing thingies...  We're ready now.
> 			   XXX If we're forcibly removed, these outgoing calls won't get
> 			   hung up XXX */
> 			tmp->q_next = outgoing;
> 			outgoing = tmp;
> 			/* If this line is up, don't try anybody else */
> 			if (outgoing->chan && (ast_channel_state(outgoing->chan) == AST_STATE_UP))
> 				break;
> 		} else {
> 			callattempt_free(tmp);
> 		}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list