[asterisk-commits] cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 13 16:44:38 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6761 )

Change subject: cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr
......................................................................

cdr.c: Fix setting dnid, callingsubaddr, and calledsubaddr

The string comparisons for setting these CDR variables was inverted.  We
were repeatedly setting these CDR variables only if the channel snapshots
had the same value.

ASTERISK-27335

Change-Id: I9482073524411e7ea6c03805b16de200cb1669ea
---
M main/cdr.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/cdr.c b/main/cdr.c
index ecf7bd3..c2f981c 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -1333,13 +1333,13 @@
 		set_variable(&old_snapshot->variables, "calledsubaddr", new_snapshot->dialed_subaddr);
 		return;
 	}
-	if (!strcmp(old_snapshot->snapshot->caller_dnid, new_snapshot->caller_dnid)) {
+	if (strcmp(old_snapshot->snapshot->caller_dnid, new_snapshot->caller_dnid)) {
 		set_variable(&old_snapshot->variables, "dnid", new_snapshot->caller_dnid);
 	}
-	if (!strcmp(old_snapshot->snapshot->caller_subaddr, new_snapshot->caller_subaddr)) {
+	if (strcmp(old_snapshot->snapshot->caller_subaddr, new_snapshot->caller_subaddr)) {
 		set_variable(&old_snapshot->variables, "callingsubaddr", new_snapshot->caller_subaddr);
 	}
-	if (!strcmp(old_snapshot->snapshot->dialed_subaddr, new_snapshot->dialed_subaddr)) {
+	if (strcmp(old_snapshot->snapshot->dialed_subaddr, new_snapshot->dialed_subaddr)) {
 		set_variable(&old_snapshot->variables, "calledsubaddr", new_snapshot->dialed_subaddr);
 	}
 }

-- 
To view, visit https://gerrit.asterisk.org/6761
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I9482073524411e7ea6c03805b16de200cb1669ea
Gerrit-Change-Number: 6761
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171013/40668275/attachment.html>


More information about the asterisk-commits mailing list