[asterisk-dev] [Code Review] awesome review

Russell Bryant russell at digium.com
Mon Sep 20 16:26:15 CDT 2010



> 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.
> 
> David Vossel wrote:
>     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.

so just add a case -1, then.  That's the only exception.


- Russell


-----------------------------------------------------------
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