<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6614">View Change</a></p><p>Patch set 4:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(5 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/6614/4/bridges/bridge_softmix.c">File bridges/bridge_softmix.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6614/4/bridges/bridge_softmix.c@683">Patch Set #4, Line 683:</a> <code style="font-family:monospace,monospace">   if (!caller || ast_strlen_zero(caller->id.name.str)) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">1) Use of caller->id.name.str also needs to be qualified by the caller->id.name.valid flag.</p><p style="white-space: pre-wrap; word-wrap: break-word;">2) May also want to further check if the name is marked as private.</p><p style="white-space: pre-wrap; word-wrap: break-word;">3) You should copy the name into a stack variable while bridge_channel->chan is locked.</p><p style="white-space: pre-wrap; word-wrap: break-word;">4) caller can never be NULL since ast_channel_caller() returns an address inside the ast_channel struct.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6614/4/bridges/bridge_softmix.c@703">Patch Set #4, Line 703:</a> <code style="font-family:monospace,monospace">            ds = ast_channel_datastore_find(cur->chan, &text_message_originator_name, NULL);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It is easy to get the sender datastore out of sync with the message sender if you happen to have several people sending messages at the same time.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6614/4/bridges/bridge_softmix.c@707">Patch Set #4, Line 707:</a> <code style="font-family:monospace,monospace">                   if (!(ds = ast_datastore_alloc(&text_message_originator_name, NULL))) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Please get out of the bad habit of putting assignments in if statements.<br>1) They don't have good line breaks.<br>2) It is easy to get the isolation parentheses in the wrong place.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6614/4/bridges/bridge_softmix.c@713">Patch Set #4, Line 713:</a> <code style="font-family:monospace,monospace">           if (!(ds->data = ast_strdup(caller->id.name.str))) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">same</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/6614/4/channels/chan_pjsip.c">File channels/chan_pjsip.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6614/4/channels/chan_pjsip.c@2241">Patch Set #4, Line 2241:</a> <code style="font-family:monospace,monospace">      data->originator_name = NULL;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This assignment isn't necessary as ao2_alloc() has zeroed the struct.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6614">change 6614</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/6614"/><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: Idacf5900bfd5f22ab8cd235aa56dfad090d18489 </div>
<div style="display:none"> Gerrit-Change-Number: 6614 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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: 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: Thu, 28 Sep 2017 18:12:33 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>