<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5854">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 style="white-space: pre-wrap; word-wrap: break-word;">The whole point of getting those RTP instance refs is so they are still around and accessible by native_rtp_bridge_stop() to clear the instance->local_bridge() pointer safely on both channels.  native_rtp_bridge_stop() should not need to call native_rtp_bridge_get() for the instance ponters to unlink the bridged instances.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Placing the rtp instance refs in the bridge_channel tech_pvt struct used for the framehook control will not hold the refs for the needed lifetime since native_rtp_bridge_stop() is called after native_rtp_bridge_framehook_detach() destroys it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">There is a bridge->tech_pvt pointer available that can be used to hold a vector of rtp instance pointers.  When native_rtp_bridge_start() sets the rtp instance bridged pointers in the rtp instances and in the vector.  native_rtp_bridge_stop() can unlink those rtp instance bridged pointers from the saved vector.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This was discussed on IRC.</p><p>(6 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5854/1/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/1/bridges/bridge_native_rtp.c@170">Patch Set #1, Line 170:</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 (bc0 == bc1) {<br>             ast_debug(2, "Bridge '%s' doesn't start when both channels are '%s'\n", bridge->uniqueid,<br>                    ast_channel_name(bc0->chan));<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This test is false if there are two or more channels in the bridge so the debug is not accurate.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/1/bridges/bridge_native_rtp.c@195">Patch Set #1, Line 195:</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></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is redundant with the verbose message.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/1/bridges/bridge_native_rtp.c@213">Patch Set #1, Line 213:</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></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">redundant</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/1/bridges/bridge_native_rtp.c@525">Patch Set #1, Line 525:</a> <code style="font-family:monospace,monospace">    // get_rtp_info bumps the instance refcount for us</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">C++ comments</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/1/bridges/bridge_native_rtp.c@576">Patch Set #1, Line 576:</a> <code style="font-family:monospace,monospace"> * \brief For debugging bridge lifecycle only</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">wth?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5854/1/bridges/bridge_native_rtp.c@596">Patch Set #1, Line 596:</a> <code style="font-family:monospace,monospace"> * \brief For debugging bridge lifecycle only</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">wth?</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: 1 </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: Mon, 19 Jun 2017 15:54:50 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>