[asterisk-dev] [Code Review] New DUNDi cli commands to list cache entries

Paul Belanger reviewboard at asterisk.org
Wed Sep 14 14:37:17 CDT 2011


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


code review and a few comments about reducing indents.


branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8432>

    blob



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8435>

    braces { }



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8436>

    while (...)



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8429>

    How about:
    
    if (expiry < 1) {
         continue;
    }



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8431>

    if (sscanf(...) != 3) {
        continue;
    }



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8430>

    Again?
    
    if (!term) {
         continue;
    }



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8433>

    blob



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8439>

    while (..)



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8437>

    This looks to be almost the same logic as above, maybe convert into a function?



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8434>

    more



branches/10/pbx/pbx_dundi.c
<https://reviewboard.asterisk.org/r/1438/#comment8438>

    how about?
    if (*ptr != 'e') {
        continue;
    }


- Paul


On Sept. 14, 2011, 2:25 p.m., Leif Madsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1438/
> -----------------------------------------------------------
> 
> (Updated Sept. 14, 2011, 2:25 p.m.)
> 
> 
> Review request for Asterisk Developers, Russell Bryant and Paul Belanger.
> 
> 
> Summary
> -------
> 
> This patch adds the following cli commands for DUNDi:
> 
> dundi show cache: List DUNDi cache entries
> dundi show hints: List DUNDi 'DONTASK' hints in the cache
> 
> 
> (Developer is Peter Racz from JIRA)
> 
> 
> This addresses bug ASTERISK-18390.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18390
> 
> 
> Diffs
> -----
> 
>   branches/10/pbx/pbx_dundi.c 334005 
> 
> Diff: https://reviewboard.asterisk.org/r/1438/diff
> 
> 
> Testing
> -------
> 
> I've tested this on my Asterisk 10 box, and the commands work as I would expect.
> 
> 
> Thanks,
> 
> Leif
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110914/c86b339b/attachment-0001.htm>


More information about the asterisk-dev mailing list