]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_cdr: Allow empty value for CDR dialplan function.
authorJoshua Colp <jcolp@digium.com>
Fri, 5 May 2017 13:48:34 +0000 (13:48 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 5 May 2017 13:59:02 +0000 (08:59 -0500)
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

funcs/func_cdr.c

index 82ff488b047846e2eb38c0fd1bf3cc5992e6a711..219e0042987fdbc0e2e0bd1cd46d7dbe180a4695 100644 (file)
@@ -377,7 +377,7 @@ static void cdr_write_callback(void *data, struct stasis_subscription *sub, stru
                        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;