<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6793">View Change</a></p><p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(1 comment)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/6793/2/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/6793/2/res/res_pjsip_session.c@3137">Patch Set #2, Line 3137:</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(5, "Setting external media address to %s\n", ast_sockaddr_stringify_host(&transport_state->external_media_address));<br> pj_strdup2(tdata->pool, &sdp->conn->addr, ast_sockaddr_stringify_host(&transport_state->external_media_address));<br> pj_strdup2(tdata->pool, &sdp->origin.addr, ast_sockaddr_stringify_host(&transport_state->external_media_address));<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">ast_sockaddr_stringify_host() could be an expensive call and here we are calling it up to three times in a row.</p><p style="white-space: pre-wrap; word-wrap: break-word;">ast_sockaddr_stringify_host() returns a pointer to a thread specific string buffer so we can safely save the pointer to use in these three locations.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6793">change 6793</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/6793"/><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: I690163b6e762042ec38b3995aa5c9bea909d8ec4 </div>
<div style="display:none"> Gerrit-Change-Number: 6793 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 13 Oct 2017 22:49:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>