From 6393c106ca12fda924c5e15e004a45a072271c4d Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Thu, 5 Oct 2017 18:03:11 -0500 Subject: [PATCH] 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 --- main/cdr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/cdr.c b/main/cdr.c index ecf7bd30bc..c2f981c1a3 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1333,13 +1333,13 @@ static void cdr_object_update_cid(struct cdr_object_snapshot *old_snapshot, stru 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); } }