<p>George Joseph <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5854">View Change</a></p><p>Patch set 3:</p><p>(8 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c">File bridges/bridge_native_rtp.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@47">Patch Set #3, Line 47:</a> <code style="font-family:monospace,monospace">#include "asterisk/linkedlists.h"</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Why was this include added?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@161">Patch Set #3, Line 161:</a> <code style="font-family:monospace,monospace">        AST_VECTOR_INIT(&data->instances, 4);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">AST_VECTOR_INIT() can fail to allocate the initial vector array.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">no longer applicable</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@207">Patch Set #3, Line 207:</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;">    struct channel_instance_data *data = ao2_alloc(sizeof(*data),<br>         channel_instance_data_destructor);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Use ao2_alloc_options() since the object doesn't need any lock.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@273">Patch Set #3, Line 273:</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;">       RAII_VAR(struct ast_format_cap *, cap0,<br>               ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT), ao2_cleanup);<br>      RAII_VAR(struct ast_format_cap *, cap1,<br>               ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT), ao2_cleanup);<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Pre-existing bug: cap0 and cap1 are not checked for failure.  Also allocati</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@301">Patch Set #3, Line 301:</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, "Locally RTP bridged '%s' and '%s' in stack\n",<br>                        ast_channel_name(bc0->chan), ast_channel_name(bc1->chan));<br>              ast_verb(4, "Locally RTP bridged '%s' and '%s' in stack\n",<br>                 ast_channel_name(bc0->chan), ast_channel_name(bc1->chan));<br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">The added debug log message is redundant with the existing verbose<br>message.  This is patch debugging and should not be left in the<br>final patch.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">If you turn verbose on you get a ton of non-relevant messages.  By having the debus, you can just set debug 2 on bridge_native_rtp and see only the relevant messages.<br>They don't harm anything if dev mode isn't enabled.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@322">Patch Set #3, Line 322:</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, "Remotely bridged '%s' and '%s' - media will flow directly between them\n",<br>                            ast_channel_name(bc0->chan), ast_channel_name(bc1->chan));<br>                      ast_verb(4, "Remotely bridged '%s' and '%s' - media will flow directly between them\n",<br>                             ast_channel_name(bc0->chan), ast_channel_name(bc1->chan));<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The added debug log message is redundant with the existing verbose message.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">same</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@740">Patch Set #3, Line 740:</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;"> ao2_cleanup(data);<br>    bridge_channel->tech_pvt = NULL;<br></pre></blockquote></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I'd swap these two lines for safety so the tech_pvt doesn't briefly<br>point to stale data.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">no longer applicable</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/3/bridges/bridge_native_rtp.c@781">Patch Set #3, Line 781:</a> <code style="font-family:monospace,monospace">static void native_rtp_bridge_unsuspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">A channel can get suspended from a bridge so it can play a sound file or it</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5854">change 5854</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/5854"/><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: I9e1ac49fa4af68d64826ccccd152593cf8cdb21a </div>
<div style="display:none"> Gerrit-Change-Number: 5854 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 20 Jun 2017 19:49:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>