<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6750">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cdr.c: Defer misc checks.<br><br>Try to defer some checks until needed in case there is an early exit.<br><br>Change-Id: Ibc6b34c38a4f60ad4f9b67984b7d070a07257064<br>---<br>M main/cdr.c<br>1 file changed, 11 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/cdr.c b/main/cdr.c<br>index 8a1226b..ecf7bd3 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -1932,6 +1932,10 @@<br> if (!peer && !caller) {<br> return;<br> }<br>+ if (filter_channel_snapshot(peer) || (caller && filter_channel_snapshot(caller))) {<br>+ return;<br>+ }<br>+<br> dial_status_blob = ast_json_object_get(ast_multi_channel_blob_get_json(payload), "dialstatus");<br> if (dial_status_blob) {<br> dial_status = ast_json_string_get(dial_status_blob);<br>@@ -1943,10 +1947,6 @@<br> peer ? peer->name : "(none)",<br> (unsigned int)stasis_message_timestamp(message)->tv_sec,<br> (unsigned int)stasis_message_timestamp(message)->tv_usec);<br>-<br>- if (filter_channel_snapshot(peer) || (caller && filter_channel_snapshot(caller))) {<br>- return;<br>- }<br> <br> /* Figure out who is running this show */<br> if (caller) {<br>@@ -2077,8 +2077,6 @@<br> struct stasis_cache_update *update = stasis_message_data(message);<br> struct ast_channel_snapshot *old_snapshot;<br> struct ast_channel_snapshot *new_snapshot;<br>- const char *uniqueid;<br>- const char *name;<br> struct cdr_object *it_cdr;<br> <br> ast_assert(update != NULL);<br>@@ -2086,8 +2084,6 @@<br> <br> old_snapshot = stasis_message_data(update->old_snapshot);<br> new_snapshot = stasis_message_data(update->new_snapshot);<br>- uniqueid = new_snapshot ? new_snapshot->uniqueid : old_snapshot->uniqueid;<br>- name = new_snapshot ? new_snapshot->name : old_snapshot->name;<br> <br> if (filter_channel_cache_message(old_snapshot, new_snapshot)) {<br> return;<br>@@ -2101,11 +2097,17 @@<br> cdr->is_root = 1;<br> ao2_link(active_cdrs_by_channel, cdr);<br> } else {<br>+ const char *uniqueid;<br>+<br>+ uniqueid = new_snapshot ? new_snapshot->uniqueid : old_snapshot->uniqueid;<br> cdr = ao2_find(active_cdrs_by_channel, uniqueid, OBJ_SEARCH_KEY);<br> }<br> <br> /* Handle Party A */<br> if (!cdr) {<br>+ const char *name;<br>+<br>+ name = new_snapshot ? new_snapshot->name : old_snapshot->name;<br> ast_log(AST_LOG_WARNING, "No CDR for channel %s\n", name);<br> ast_assert(0);<br> } else {<br>@@ -4288,7 +4290,7 @@<br> RAII_VAR(struct module_config *, old_mod_cfg, ao2_global_obj_ref(module_configs), ao2_cleanup);<br> RAII_VAR(struct module_config *, mod_cfg, NULL, ao2_cleanup);<br> <br>- if (process_config(1)) {<br>+ if (!old_mod_cfg || process_config(1)) {<br> return -1;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6750">change 6750</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/6750"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ibc6b34c38a4f60ad4f9b67984b7d070a07257064 </div>
<div style="display:none"> Gerrit-Change-Number: 6750 </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: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>