<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8047">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>(3 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8047/4//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8047/4//COMMIT_MSG@7">Patch Set #4, Line 7:</a> <code style="font-family:monospace,monospace">Fixed null string trailing after AsyncAGIEnd AMI event</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">manager.c: Fixed "(null):" header in AMI AsyncAGIEnd event</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/8047/4/main/manager.c">File main/manager.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8047/4/main/manager.c@1773">Patch Set #4, Line 1773:</a> <code style="font-family:monospace,monospace">       if (!obj || (!res && !(*res) && (!(*res = ast_str_create(1024))))) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">While you are fixing the other error you should fix this bad expression too.  It doesn't cover the error conditions it is trying to handle.  It should be:</p><p style="white-space: pre-wrap; word-wrap: break-word;">if (!obj || !res || (!*res && !(*res = ast_str_create(1024)))) {<br>}</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8047/4/main/manager.c@1809">Patch Set #4, Line 1809:</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;">       if (ast_json_is_null(blob)) {<br>         ast_str_append(&res, 0, "%s", "");<br>    }<br>     else {<br>                manager_json_to_ast_str(blob, NULL, &res, exclusion_cb);<br>  }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">There is no need to append an empty string to the just created  ast_str res.  It is already an empty string.</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (!ast_json_is_null(blob)) {<br>   manager_json_to_ast_str(blob, NULL, &res, exclusion_cb);<br>}</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8047">change 8047</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/8047"/><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: Ice58c16361f9d9e8648261c9ed5d6c8245fb0d8f </div>
<div style="display:none"> Gerrit-Change-Number: 8047 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.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-Reviewer: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 01 Feb 2018 19:27:09 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>