<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6708">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: 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: Replace redundant check with an ast_assert()<br><br>The only caller of cdr_object_fn_table.process_party_b() explicitly does<br>the check before calling.<br><br>Change-Id: Ib0c53cdf5048227842846e0df9d2c19117c45618<br>---<br>M main/cdr.c<br>1 file changed, 5 insertions(+), 8 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..0703f9e 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -1623,11 +1623,9 @@<br> static void dial_state_process_party_b(struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)<br> {<br> ast_assert(snapshot != NULL);<br>+ ast_assert(cdr->party_b.snapshot<br>+ && !strcasecmp(cdr->party_b.snapshot->name, snapshot->name));<br> <br>- if (!cdr->party_b.snapshot<br>- || strcasecmp(cdr->party_b.snapshot->name, snapshot->name)) {<br>- return;<br>- }<br> cdr_object_swap_snapshot(&cdr->party_b, snapshot);<br> <br> /* If party B hangs up, finalize this CDR */<br>@@ -1823,10 +1821,9 @@<br> <br> static void bridge_state_process_party_b(struct cdr_object *cdr, struct ast_channel_snapshot *snapshot)<br> {<br>- if (!cdr->party_b.snapshot<br>- || strcasecmp(cdr->party_b.snapshot->name, snapshot->name)) {<br>- return;<br>- }<br>+ ast_assert(cdr->party_b.snapshot<br>+ && !strcasecmp(cdr->party_b.snapshot->name, snapshot->name));<br>+<br> cdr_object_swap_snapshot(&cdr->party_b, snapshot);<br> <br> /* If party B hangs up, finalize this CDR */<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6708">change 6708</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/6708"/><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: Ib0c53cdf5048227842846e0df9d2c19117c45618 </div>
<div style="display:none"> Gerrit-Change-Number: 6708 </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: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>