[asterisk-commits] cdr: Allow setting of user field from 'h' extension (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 24 17:48:16 CDT 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5281 )

Change subject: cdr: Allow setting of user field from 'h' extension
......................................................................


cdr: Allow setting of user field from 'h' extension

The CDR code previously did not allow the user field to be set
from the 'h' extension in the dialplan. This change removes that
limitation and allows it to be set.

ASTERISK-26818

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

Approvals:
  Mark Michelson: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/main/cdr.c b/main/cdr.c
index baa17b9..005f68c 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -3253,7 +3253,7 @@
 	struct party_b_userfield_update *info = arg;
 	struct cdr_object *it_cdr;
 	for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
-		if (it_cdr->fn_table == &finalized_state_fn_table) {
+		if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) {
 			continue;
 		}
 		if (it_cdr->party_b.snapshot
@@ -3277,7 +3277,7 @@
 	if (cdr) {
 		ao2_lock(cdr);
 		for (it_cdr = cdr; it_cdr; it_cdr = it_cdr->next) {
-			if (it_cdr->fn_table == &finalized_state_fn_table) {
+			if (it_cdr->fn_table == &finalized_state_fn_table && it_cdr->next != NULL) {
 				continue;
 			}
 			strcpy(it_cdr->party_a.userfield, userfield);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fed8a79b5e408bac4e30542b8f33a61c5ed9aa6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Sebastian Gutierrez <scgm11 at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list