<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6706">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 e09efe2..56edb79 100644<br>--- a/main/cdr.c<br>+++ b/main/cdr.c<br>@@ -1627,11 +1627,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>@@ -1827,10 +1825,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/6706">change 6706</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/6706"/><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: Ib0c53cdf5048227842846e0df9d2c19117c45618 </div>
<div style="display:none"> Gerrit-Change-Number: 6706 </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>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>