[asterisk-dev] [Code Review] awesome review

David Vossel dvossel at digium.com
Mon Sep 20 16:21:18 CDT 2010



> On 2010-09-20 12:32:00, Russell Bryant wrote:
> > /branches/1.8/funcs/func_frame_trace.c, lines 69-71
> > <https://reviewboard.asterisk.org/r/925/diff/2/?file=12570#file12570line69>
> >
> >     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".

"in" and "out" makes me think about transmission direction.  I did white and black to represent the type of list it is.


> On 2010-09-20 12:32:00, Russell Bryant wrote:
> > /branches/1.8/funcs/func_frame_trace.c, lines 341-343
> > <https://reviewboard.asterisk.org/r/925/diff/2/?file=12570#file12570line341>
> >
> >     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.

Yeah, I was contemplating this.  It makes sense for the frametype and I'll change that, but for the AST_CONTROL_FRAME subclass field I didn't feel comfortable with not having a default.  We had that -1 CONTROL subclass that goes around and it doesn't have an enum value.


- David


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


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