<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6704">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Corey Farrell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">cdr.c: Replace inlined code with ao2_t_replace()<br><br>Change-Id: I9f424f5282ca7d833592f958d95f1b2bafb549b0<br>---<br>M main/cdr.c<br>1 file changed, 2 insertions(+), 10 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 1817e80..1a3ff87 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -751,11 +751,7 @@<br> */<br> static void cdr_object_snapshot_copy(struct cdr_object_snapshot *dst, struct cdr_object_snapshot *src)<br> {<br>- if (dst->snapshot) {<br>- ao2_t_ref(dst->snapshot, -1, "release old snapshot during copy");<br>- }<br>- dst->snapshot = src->snapshot;<br>- ao2_t_ref(dst->snapshot, +1, "bump new snapshot during copy");<br>+ ao2_t_replace(dst->snapshot, src->snapshot, "CDR snapshot copy");<br> strcpy(dst->userfield, src->userfield);<br> dst->flags = src->flags;<br> copy_variables(&dst->variables, &src->variables);<br>@@ -1358,11 +1354,7 @@<br> struct ast_channel_snapshot *new_snapshot)<br> {<br> cdr_object_update_cid(old_snapshot, new_snapshot);<br>- if (old_snapshot->snapshot) {<br>- ao2_t_ref(old_snapshot->snapshot, -1, "Drop ref for swap");<br>- }<br>- ao2_t_ref(new_snapshot, +1, "Bump ref for swap");<br>- old_snapshot->snapshot = new_snapshot;<br>+ ao2_t_replace(old_snapshot->snapshot, new_snapshot, "Swap CDR shapshot");<br> }<br> <br> /* BASE METHOD IMPLEMENTATIONS */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6704">change 6704</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/6704"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I9f424f5282ca7d833592f958d95f1b2bafb549b0 </div>
<div style="display:none"> Gerrit-Change-Number: 6704 </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: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>