<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6785">View Change</a></p><p>Patch set 1:<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/6785/1/main/cdr.c">File main/cdr.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6785/1/main/cdr.c@1102">Patch Set #1, Line 1102:</a> <code style="font-family:monospace,monospace"> if (ast_test_flag(&mod_cfg->general->settings, CDR_INITIATED_SECONDS)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think this should use is_cdr_flag_set. That way it would return `ms / 1000` if we don't have a config object instead of returning 0.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6785/1/main/cdr.c@2688">Patch Set #1, Line 2688:</a> <code style="font-family:monospace,monospace"> ao2_cleanup(mod_cfg->general);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Nit: this could use ao2_replace instead. Feel free to ignore this since you're not already modifying these 3 lines, it would just make it easier to read.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This function doesn't seem thread safe but it's only used by a test so I guess no big deal?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6785/1/main/cdr.c@2708">Patch Set #1, Line 2708:</a> <code style="font-family:monospace,monospace"> is_enabled = ast_test_flag(&mod_cfg->general->settings, CDR_ENABLED);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Once we have is_cdr_flag_set it should be used here instead of duplicating the logic.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6785/1/main/cdr.c@4303">Patch Set #1, Line 4303:</a> <code style="font-family:monospace,monospace"> return -1;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Do we not want to treat this situation as if CDR is disabled and call destroy_subscriptions?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6785/1/main/cdr.c@4424">Patch Set #1, Line 4424:</a> <code style="font-family:monospace,monospace"> if (!mod_cfg) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It seems like we should treat this as if cdr is disabled. We've already confirmed that old_mod_cfg != NULL so we should finalize_batch_mode if appropriate and still call cdr_toggle_runtime_options.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6785">change 6785</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/6785"/><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: Iceaad93172862f610cad0188956634187bfcc7cd </div>
<div style="display:none"> Gerrit-Change-Number: 6785 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </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-Comment-Date: Thu, 12 Oct 2017 19:34:35 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>