[Asterisk-code-review] func cdr: Allow empty value for CDR dialplan function. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Fri May 5 08:59:03 CDT 2017


Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/5588 )

Change subject: func_cdr: Allow empty value for CDR dialplan function.
......................................................................

func_cdr: Allow empty value for CDR dialplan function.

A regression was introduced in 12 where passing an empty value
to the CDR dialplan function was not longer allowed. This
change returns to the behavior of 11 where it is permitted.

ASTERISK-26173

Change-Id: I3f148203b54ec088007e29e30005a5de122e51c5
---
M funcs/func_cdr.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/5588/1

diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 82ff488..219e004 100644
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -377,7 +377,7 @@
 			payload->cmd, payload->cmd);
 		return;
 	}
-	if (ast_strlen_zero(payload->value)) {
+	if (!payload->value) {
 		ast_log(AST_LOG_WARNING, "%s requires a value (%s(variable)=value)\n)",
 			payload->cmd, payload->cmd);
 		return;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f148203b54ec088007e29e30005a5de122e51c5
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list