[Asterisk-code-review] pbx_variables: Increase parsing capabilities of MSet (asterisk[16])

N A asteriskteam at digium.com
Mon Dec 13 07:38:46 CST 2021


N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17667 )


Change subject: pbx_variables: Increase parsing capabilities of MSet
......................................................................

pbx_variables: Increase parsing capabilities of MSet

Currently MSet can only parse a maximum of 24 variables.
If more variables are provided to MSet, the 24th variable
will simply contain the remainder of the string and the
remaining variables thereafter will never get set.

This increases the number of variables that can be parsed
in one go from 24 to 99. Additionally, documentation is added
since this limitation is currently undocumented and is
confusing to users who encounter this limitation.

ASTERISK-29766 #close

Change-Id: I3fe35b462dedec0a452fd9ea7f92c920a3939f16
---
M main/pbx_variables.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/67/17667/1

diff --git a/main/pbx_variables.c b/main/pbx_variables.c
index 91b5bbb..6077b06 100644
--- a/main/pbx_variables.c
+++ b/main/pbx_variables.c
@@ -98,6 +98,7 @@
 			double-quotes from the right-hand side (value). If you need to put a separator
 			character (comma or vert-bar), you will need to escape them by inserting a backslash
 			before them. Avoid its use if possible.</para>
+			<para>This application allows up to 99 variables to be set at once.</para>
 		</description>
 		<see-also>
 			<ref type="application">Set</ref>
@@ -1157,7 +1158,7 @@
 	char *data;
 	int x;
 	AST_DECLARE_APP_ARGS(args,
-		AST_APP_ARG(pair)[24];
+		AST_APP_ARG(pair)[99]; /* parse up to 99 variables */
 	);
 	AST_DECLARE_APP_ARGS(pair,
 		AST_APP_ARG(name);

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17667
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I3fe35b462dedec0a452fd9ea7f92c920a3939f16
Gerrit-Change-Number: 17667
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211213/b52ca3f9/attachment-0001.html>


More information about the asterisk-code-review mailing list