diff options
author | Richard Mudgett <rmudgett@digium.com> | 2017-10-05 18:03:11 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2017-10-12 19:11:40 -0500 |
commit | bd16bcb77c16f3335d55978c6e9ab953680f6a3a (patch) | |
tree | 6209bece62b94d7e86c5f98d91f30c8e37051b0b | |
parent | a7d977d986f3d5221ad5658b58c3725c06954617 (diff) |
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
-rw-r--r-- | main/cdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/cdr.c b/main/cdr.c index d34503d12..fc125f254 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); } } |