[asterisk-dev] [Code Review] 4035: Dialplan function to get first/head caller channel on queue

rmudgett reviewboard at asterisk.org
Tue Sep 30 16:19:09 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4035/#review13424
-----------------------------------------------------------

Ship it!


Minor nits


/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/4035/#comment23948>

    It is best if there is only one declaration per line:
    struct call_queue *q;
    struct call_queue tmpq = {
      ...
    };



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/4035/#comment23947>

    Initialization is unnecessary since the first use sets the value.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/4035/#comment23951>

    Assignments in if statements are harder to read when the line is very long because there are fewer acceptable places where you can break the line.
    
    q = ao2_t_find();
    if (q) {
      ...
      return 0;
    }
    var = ast_load_realtime();
    if (var) {
      ...
      return 0;
    }
    ast_log(LOG_WARNING, ...);
    return 0;
    


- rmudgett


On Sept. 30, 2014, 3:04 a.m., Kristian Høgh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4035/
> -----------------------------------------------------------
> 
> (Updated Sept. 30, 2014, 3:04 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24365
>     https://issues.asterisk.org/jira/browse/ASTERISK-24365
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The function returns the first caller in a specific queue.
> Noop(${QUEUE_GET_FIRSTCHANNEL(queuename)})
> "SIP/peer-00000002", if queue exist and is non-empty
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_queue.c 424149 
> 
> Diff: https://reviewboard.asterisk.org/r/4035/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kristian Høgh
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140930/e2fe381f/attachment-0001.html>


More information about the asterisk-dev mailing list