[asterisk-dev] [Code Review] awesome review

Russell Bryant russell at digium.com
Mon Sep 20 12:32:00 CDT 2010


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

Ship it!


My comments here are mostly minor.  Feel free to merge when you're ready after this.


/branches/1.8/funcs/func_frame_trace.c
<https://reviewboard.asterisk.org/r/925/#comment5928>

    I wonder if setting the filter type to "in" or "out" so that you're filtering in or filtering out would make more sense than "white" or "black".



/branches/1.8/funcs/func_frame_trace.c
<https://reviewboard.asterisk.org/r/925/#comment5929>

    Should you return error here?



/branches/1.8/funcs/func_frame_trace.c
<https://reviewboard.asterisk.org/r/925/#comment5931>

    I think it would be nice to have all data for a frame on the same line of output.



/branches/1.8/funcs/func_frame_trace.c
<https://reviewboard.asterisk.org/r/925/#comment5930>

    Indent break; in this switch statement



/branches/1.8/funcs/func_frame_trace.c
<https://reviewboard.asterisk.org/r/925/#comment5932>

    Since the frame type is an enum, if you don't put a default case here, you'll get a compiler warning if a new type is added and it's not handled in this switch statement.  The same goes for control frame subclass.



/branches/1.8/include/asterisk/framehook.h
<https://reviewboard.asterisk.org/r/925/#comment5933>

    Update example code to following coding guidelines - { on next line here



/branches/1.8/include/asterisk/framehook.h
<https://reviewboard.asterisk.org/r/925/#comment5934>

    doxygenify



/branches/1.8/main/framehook.c
<https://reviewboard.asterisk.org/r/925/#comment5936>

    I'd like see a check of the version number at the beginning of this function:
    
    if (i->version != AST_FRAMEHOOK_INTERFACE_VERSION) {
        ast_log(LOG_ERROR, "Version '%hu' of framehook interface not what we were compiled against (%hu)\n", i->version, AST_FRAMEHOOK_INTERFACE_VERSION);
        return -1;
    }
    
    something like that ...



/branches/1.8/main/framehook.c
<https://reviewboard.asterisk.org/r/925/#comment5935>

    Why not embed an ast_framehook_interface instance inside of ast_framehook?  Then you could just:
    
    framehook->interface = *i;


- Russell


On 2010-09-20 10:51:00, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/925/
> -----------------------------------------------------------
> 
> (Updated 2010-09-20 10:51:00)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> I wrote a new API called AwesomeHook.  It allows for ast_frames to be intercepted, viewed, and modified while being read and written to a channel.  Detailed documentation pertaining to this API can be found in awesomehook.h.  I have also included a new dialplan function called AWESOME_TRACE() which exercises the AwesomeHook API.  Documentation and use of this function can be found in func_awesome_trace.c.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/funcs/func_frame_trace.c PRE-CREATION 
>   /branches/1.8/include/asterisk/channel.h 287554 
>   /branches/1.8/include/asterisk/framehook.h PRE-CREATION 
>   /branches/1.8/main/channel.c 287554 
>   /branches/1.8/main/framehook.c PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/925/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list