<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8451">View Change</a></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(7 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8451/1/apps/app_directory.c">File apps/app_directory.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/apps/app_directory.c@821">Patch Set #1, Line 821:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">          ast_debug(2, "Listing matching entries:\n");<br>                for (ptr = sorted, i = 0; i < count; i++, ptr++) {<br>                 ast_debug(2, "%s: %s\n", ptr[0]->exten, ptr[0]->name);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">These ast_debug(2,...) should be replaced with ast_log(LOG_DEBUG,...) since they are now guarded by a common DEBUG_ATLEAST().</p><p style="white-space: pre-wrap; word-wrap: break-word;">ast_debug has DEBUG_ATLEAST built into it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">THIS NEEDS TO BE DONE THROUGHOUT THIS PATCH.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8451/1/channels/chan_sip.c">File channels/chan_sip.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/channels/chan_sip.c@22335">Patch Set #1, Line 22335:</a> <code style="font-family:monospace,monospace">     if (!DEBUG_ATLEAST(1) && !sipdebug) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">These tests should now be swapped since DEBUG_ATLEAST is more expensive than checking sipdebug.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8451/1/main/sched.c">File main/sched.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/main/sched.c@37">Patch Set #1, Line 37:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  if (DEBUG_ATLEAST(1)) \<br>               DEBUG_M(a) \<br>  } while (0)<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This should just be defined:<br>#define DEBUG(a) a</p><p style="white-space: pre-wrap; word-wrap: break-word;">All uses of DEBUG in this file pass the a parameter as an ast_debug() call.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/main/sched.c@553">Patch Set #1, Line 553:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">      if (DEBUG_ATLEAST(1))<br>         ast_sched_dump(con);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">We should just call ast_sched_dump() instead.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/main/sched.c@654">Patch Set #1, Line 654:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">      if (DEBUG_ATLEAST(1))<br>         ast_sched_dump(con);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">We should just call ast_sched_dump() instead.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/main/sched.c@713">Patch Set #1, Line 713:</a> <code style="font-family:monospace,monospace">void ast_sched_dump(struct ast_sched_context *con)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The first thing this function should do is check if DEBUG_ATLEAST() allows dumping the scheduler and the other ast_debug(1,...) calls should become ast_log(LOG_DEBUG,...) calls.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8451/1/res/res_rtp_asterisk.c">File res/res_rtp_asterisk.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8451/1/res/res_rtp_asterisk.c@5254">Patch Set #1, Line 5254:</a> <code style="font-family:monospace,monospace">                 if (DEBUG_ATLEAST(1) || rtpdebug) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should swap these tests since DEBUG_ATLEAST() is more expensive than the rtpdebug check.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8451">change 8451</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8451"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0 </div>
<div style="display:none"> Gerrit-Change-Number: 8451 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 07 Mar 2018 17:02:04 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>