<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6819">View Change</a></p><p>Patch set 7:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(7 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c">File cdr/cdr_beanstalkd.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c">Patch Set #7:</a> </p><p style="white-space: pre-wrap; word-wrap: break-word;">I did not look clearly enough before, I just realized this whole file is space indented.  Coding guidelines [1] call for all indentation to be done with tabs.  One thing about the wiki page don't use ASTERISK_FILE_VERSION.  At this point that only applies to Asterisk 13.</p><p style="white-space: pre-wrap; word-wrap: break-word;">[1] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@42">Patch Set #7, Line 42:</a> <code style="font-family:monospace,monospace">      <support_level>exended</support_level></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Missing the 't' in extended.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@117">Patch Set #7, Line 117:</a> <code style="font-family:monospace,monospace">    bs_host = DEFAULT_BEANSTALK_HOST;</code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">bs_host / bs_tube have to be allocated:<br>bs_host = ast_strdup(DEFAULT_BEANSTALK_HOST);</p><p style="white-space: pre-wrap; word-wrap: break-word;">Otherwise when you eventually call ast_free it will segfault.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">You missed this for bs_host and bs_tube.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@166">Patch Set #7, Line 166:</a> <code style="font-family:monospace,monospace">    char strAnswerTime[80];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">strAnswerTime does have to be pre-initialized because it's only set conditionally (my previous finding was for the other variables).</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@241">Patch Set #7, Line 241:</a> <code style="font-family:monospace,monospace">    if (bs_host) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You don't need to check if a variable is set to call ast_free.  It's easier to reach if you don't use the conditional.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@245">Patch Set #7, Line 245:</a> <code style="font-family:monospace,monospace">    if (bs_tube) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This one too.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6819/7/cdr/cdr_beanstalkd.c@270">Patch Set #7, Line 270:</a> <code style="font-family:monospace,monospace">    .support_level = AST_MODULE_SUPPORT_CORE,</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Support level AST_MODULE_SUPPORT_EXTENDED.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6819">change 6819</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/6819"/><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: I5fe4089a34ab3b39230786d9bbfddafa56715f48 </div>
<div style="display:none"> Gerrit-Change-Number: 6819 </div>
<div style="display:none"> Gerrit-PatchSet: 7 </div>
<div style="display:none"> Gerrit-Owner: Nir Simionovich (GreenfieldTech - Israel) <nirs@greenfieldtech.net> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Nir Simionovich (GreenfieldTech - Israel) <nirs@greenfieldtech.net> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 18 Oct 2017 00:28:27 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>