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

Sebastian Gutierrez asteriskteam at digium.com
Wed Mar 22 08:49:29 CDT 2017


Sebastian Gutierrez has uploaded a new change for review. ( 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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/5281/1

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: newchange
Gerrit-Change-Id: I0fed8a79b5e408bac4e30542b8f33a61c5ed9aa6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Sebastian Gutierrez <scgm11 at gmail.com>



More information about the asterisk-code-review mailing list