<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5824">View Change</a></p><p>Patch set 1:</p><p style="white-space: pre-wrap; word-wrap: break-word;">This was a fairly quick exam.  Will look more tomorrow.</p><p>(5 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5824/1/include/asterisk/res_pjsip_session.h">File include/asterisk/res_pjsip_session.h:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5824/1/include/asterisk/res_pjsip_session.h@127">Patch Set #1, Line 127:</a> <code style="font-family:monospace,monospace">        AST_VECTOR(, struct ast_sip_session_media *) media;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is going to need a lock to protect access.  The serializer and channel threads have contention for the vector.</p><ul><li>The T.38 frame hooks run under the channel thread.</li><li>The chan pvt for chan_pjsip frame read/write run under the channel thread.  Though if the vector is copied to the chan pvt this case may not be a problem.</li><li>I think most other accesses are run under the serializer thread.</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">The lock is needed even more now because the vector can change during a call if streams are added/removed.</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c">File res/res_pjsip_session.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@255">Patch Set #1, Line 255:</a> <code style="font-family:monospace,monospace">             AST_VECTOR_REPLACE(&session->media, position, session_media);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">A sesssion_media ref is held by the vector so a replace needs to unref the previous occupant of the position.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@419">Patch Set #1, Line 419:</a> <code style="font-family:monospace,monospace">static int handle_negotiated_sdp(struct ast_sip_session *session, const pjmedia_sdp_session *local, const pjmedia_sdp_session *remote)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The queuing of the null frame is missing.  I think there was a reason the null frame was queued when all streams were successfully negotiated.  I don't know if it is still required though.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_session.c@1358">Patch Set #1, Line 1358:</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;">    for (i = 0; i < AST_VECTOR_SIZE(&session->media); ++i) {<br>            ao2_cleanup(AST_VECTOR_GET(&session->media, i));<br>       }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">AST_VECTOR_CALLBACK_VOID(&session->media, ao2_cleanup)</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_t38.c">File res/res_pjsip_t38.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5824/1/res/res_pjsip_t38.c@847">Patch Set #1, Line 847:</a> <code style="font-family:monospace,monospace">static int apply_negotiated_sdp_stream(struct ast_sip_session *session, </code></p><p style="white-space: pre-wrap; word-wrap: break-word;">blob</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5824">change 5824</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/5824"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I144b04f43633387b8e42a43ef3b25d7c5682b451 </div>
<div style="display:none"> Gerrit-Change-Number: 5824 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Mark Michelson <mmichelson@digium.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, 14 Jun 2017 22:42:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>