[asterisk-dev] [Code Review]: Revise skinny debugging messages

wedhorn reviewboard at asterisk.org
Tue Jul 24 15:48:02 CDT 2012



> On July 24, 2012, 11:17 a.m., opticron wrote:
> > trunk/channels/chan_skinny.c, line 137
> > <https://reviewboard.asterisk.org/r/2040/diff/5/?file=30356#file30356line137>
> >
> >     I'd prefer the locations that use global_buf to have individual buffers (defined in dev mode only if you want) to avoid multiple threads trying to access the buffer simultaneously.

The buffer is used in three places, part of the skinny device register process (basically once per device), a new call (every call), and skinny debug show cli (when used). The most likely cause of multiple threads accessing the buffer at the same time would be two simultaneous calls (on different devices), both of which would be using the same new buffer anyway.

Basically this stuff is purely for dev work, and personally i can live with the odd bit of garbage on the cli (only in dev mode) which would be preferably to something like adding locks which could result in slightly different functionality between dev mode and normal mode.

Happy to do the change, but not sure of the value added.


- wedhorn


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


On July 17, 2012, 8:44 p.m., wedhorn wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2040/
> -----------------------------------------------------------
> 
> (Updated July 17, 2012, 8:44 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Summary
> -------
> 
> Rewrite of skinny debugging.
> 
> Debugging messages and associated controls only compiled in if configured with --enable-dev-mode
> 
> Debug messages provide more detail (including thread id) and are grouped so the user/dev can limit the type of messages displayed.
> 
> Functionally no real change to chan_skinny.
> 
> While the diff is fairly large, there are basically 3 components,
>  - definition of SKINNY_DEBUG at lines 134-152
>  - control functions at lines 3238-3374
>  - numerous uses of SKINNY_DEBUG throughout
> 
> 
> Diffs
> -----
> 
>   trunk/build_tools/cflags-devmode.xml 369904 
>   trunk/channels/chan_skinny.c 369904 
> 
> Diff: https://reviewboard.asterisk.org/r/2040/diff
> 
> 
> Testing
> -------
> 
> Been running for a while with --enable-dev-mode. Compiled and tested basic functionality without --enable-dev-mode.
> 
> 
> Thanks,
> 
> wedhorn
> 
>

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


More information about the asterisk-dev mailing list