<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 7: Code-Review-1</p><p style="white-space: pre-wrap; word-wrap: break-word;">(9 comments)</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Hi Joshua,</p><p style="white-space: pre-wrap; word-wrap: break-word;">Thank you for your kind reviewing. I've fixed as your comment with replies. :)</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11013">View Change</a></p><p>9 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11013/7/include/asterisk/stasis.h">File include/asterisk/stasis.h:</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/11013/7/include/asterisk/stasis.h@524">Patch Set #7, Line 524:</a> <code style="font-family:monospace,monospace"> * \param uniqueid Uniqueid of the new topic.</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This isn't passed in.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks, fixed it. :)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/include/asterisk/stasis.h@526">Patch Set #7, Line 526:</a> <code style="font-family:monospace,monospace"> * \param detail Detail of the new topic.</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">What does detail mean exactly? What should be placed in here?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I expect some detail description of the topic.</p><p style="white-space: pre-wrap; word-wrap: break-word;">i.e. Queue main topic for subscribing every queue event</p><p style="white-space: pre-wrap; word-wrap: break-word;">Added comment for that.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/include/asterisk/stasis.h@546">Patch Set #7, Line 546:</a> <code style="font-family:monospace,monospace">struct stasis_topic *stasis_topic_get(const char *uniqueid);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This passes in name now, so it should be named appropriately.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Oops! Fixed it.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11013/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/11013/7/main/stasis.c@435">Patch Set #7, Line 435:</a> <code style="font-family:monospace,monospace">   ast_log(LOG_DEBUG, "Destroying topic. name: %s, detail: %s\n",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This should use ast_debug with a sufficiently high debug level</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Np, fixed it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/main/stasis.c@491">Patch Set #7, Line 491:</a> <code style="font-family:monospace,monospace"> if (!topic || !name || !detail) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">What if name is empty?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Agree, fixed to check the length.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/main/stasis.c@557">Patch Set #7, Line 557:</a> <code style="font-family:monospace,monospace">    if (!name || !detail) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">What if name is empty?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Agree, fixed to check the length.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/main/stasis.c@560">Patch Set #7, Line 560:</a> <code style="font-family:monospace,monospace">      ast_log(LOG_DEBUG, "Creating topic. name: %s, detail: %s\n", name, detail);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This should use ast_debug with a sufficiently high debug level</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Np, fixed it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/main/stasis.c@564">Patch Set #7, Line 564:</a> <code style="font-family:monospace,monospace">            ast_log(LOG_DEBUG, "Topic is already exist. name: %s, detail: %s\n",</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This should use ast_debug with a sufficiently high debug level</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Np, fixed it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/11013/7/main/stasis.c@1184">Patch Set #7, Line 1184:</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;">tmp_subscription = AST_VECTOR_GET_CMP(&topic->subscribers, sub, TOPIC_SUBSCRIPTION_CMP);<br>   if (!tmp_subscription) {<br>              AST_VECTOR_APPEND(&topic->subscribers, sub);<br>   }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This seems like a separate bug fix, and did you encounter a case where this happened?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Yes, I agree with it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">No, haven't seen that case yet, I just couldn't pass it.<br>Is it better to create new ticket only for this?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11013">change 11013</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/c/asterisk/+/11013"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Ie86d125d2966f93de74ee00f47ae6fbc8c081c5f </div>
<div style="display:none"> Gerrit-Change-Number: 11013 </div>
<div style="display:none"> Gerrit-PatchSet: 8 </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 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 21 Mar 2019 21:28:07 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>