<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1164/">https://reviewboard.asterisk.org/r/1164/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 15th, 2011, 5:17 a.m., <b>Russell Bryant</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On April 15th, 2011, 5:30 a.m., <b>Olle E Johansson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Because in so many cases, the hangup is a critical issue and we need to know why this happened and who issued it. I think it's important. Otherwise I would have thrown this away too, like many other debugging patches...</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I really don't like the idea of adding many arguments to a function that takes one argument strictly for the sake of debugging. Maybe you could add a debug-specific function that invokes this one as a helper method or something along those lines. I guess it wouldn't be as convenient if you couldn't immediately see what the invoking function/channel were, but you might be able to get around that by using some fancy preprocessor definitions to automatically add some of that data to that data to the function and function call if some in specific debugging compilation flag is enabled.</pre>
<br />
<p>- jrose</p>
<br />
<p>On April 7th, 2011, 6:21 a.m., Olle E Johansson wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Olle E Johansson.</div>
<p style="color: grey;"><i>Updated 2011-04-07 06:21:53</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested in various versions of Asterisk. Seems to give me the output I need.</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/view.php?id=19080">19080</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/include/asterisk/channel.h <span style="color: grey">(313005)</span></li>
<li>/trunk/main/channel.c <span style="color: grey">(313005)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1164/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>