[asterisk-dev] [Code Review] [patch] Improve debug of ast_hangup

Russell Bryant reviewboard at asterisk.org
Fri Apr 15 05:17:36 CDT 2011


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


The code is mostly fine here ... but I'm not entirely sure it's something that makes sense to go into Asterisk.  This is the kind of change that I would make (and have made many times) while debugging an issue, but just throw away when I'm done.  If we did it for this function, why not every API call in Asterisk?  Why not _every_ function?

Most cases where we have it today in the upstream code are for the purposes of resource tracking.  For example, track the real file/func/line that allocated memory.


/trunk/include/asterisk/channel.h
<https://reviewboard.asterisk.org/r/1164/#comment6960>

    For consistency, I think most other instances of this do it in the order of file, func, line.
    
    Also, most code uses __PRETTY_FUNCTION__ instead of __func__.  I don't know what the difference is off of the top of my head though.


- Russell


On 2011-04-07 06:21:53, Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1164/
> -----------------------------------------------------------
> 
> (Updated 2011-04-07 06:21:53)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> In many cases when I develop crazy code, I get weird hangups. It may only happen to me, but it does happen. I need to know when a hangup process is initiated and by whom. This small patch is a first step towards that goal.
> 
> 
> This addresses bug 19080.
>     https://issues.asterisk.org/view.php?id=19080
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/channel.h 313005 
>   /trunk/main/channel.c 313005 
> 
> Diff: https://reviewboard.asterisk.org/r/1164/diff
> 
> 
> Testing
> -------
> 
> Tested in various versions of Asterisk. Seems to give me the output I need.
> 
> 
> Thanks,
> 
> Olle E
> 
>

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


More information about the asterisk-dev mailing list