<p>Patch set 7:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/10929">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10929/7/main/stasis.c">File main/stasis.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10929/7/main/stasis.c@2228">Patch Set #7, Line 2228:</a> <code style="font-family:monospace,monospace">                            NULL, topic_proxy_name_cmp);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">topic_proxy_cmp_fn should be used for the cmp function, just remove the topic_proxy_name_cmp function.  Also you need to provide a sort callback (that's the whole point of using the _list allocator).</p><p style="white-space: pre-wrap; word-wrap: break-word;">I suggest adding AO2_STRING_FIELD_CASE_SORT_FN(topic_proxy, name); to generate topic_proxy_sort_fn.  This works differently from the _cmp_fn as it directly returns the result of strcasecmp.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10929/7/main/stasis.c@2230">Patch Set #7, Line 2230:</a> <code style="font-family:monospace,monospace">   if (ao2_container_dup(tmp_container, topic_all, OBJ_SEARCH_OBJECT)) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">ao2_container_dup is not NULL safe, need to use:<br>if (!tmp_container || ao2_container_dup(tmp_container, topic_all, OBJ_SEARCH_OBJECT)) {</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10929/7/main/stasis.c@2238">Patch Set #7, Line 2238:</a> <code style="font-family:monospace,monospace">    while ((topic = ao2_iterator_next(&iter))) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm sorry I wasn't quite clear in my previous comment.  You still need to unref topic.  The extra ref/unref that is being avoided is internal to tmp_container.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10929/7/main/stasis.c@2267">Patch Set #7, Line 2267:</a> <code style="font-family:monospace,monospace">           if (!strncasecmp(word, topic->name, wordlen) && ++which > state) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You missed my comment here, can you remove which and state from this function?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10929">change 10929</a>. To unsubscribe, or for help writing mail filters, 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/10929"/><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: Ie86d125d2966f93de74ee00f47ae6fbc8c081c5f </div>
<div style="display:none"> Gerrit-Change-Number: 10929 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 28 Jan 2019 16:38:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>