[Asterisk-code-review] app_originate: Allow variables to be set (asterisk[16])

N A asteriskteam at digium.com
Fri May 28 12:28:43 CDT 2021


Attention is currently required from: George Joseph.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15940 )

Change subject: app_originate: Allow variables to be set
......................................................................


Patch Set 3:

(3 comments)

File apps/app_originate.c:

https://gerrit.asterisk.org/c/asterisk/+/15940/comment/80fd0be2_3017d024 
PS2, Line 100: 					<argument name="var1" required="false" argsep="=">
             : 						<argument name="name" multiple="true" required="true" />
             : 						<argument name="value" required="true" />
             : 					</argument>
> This XML results in something that looks like this "v([name[=... […]
Done


https://gerrit.asterisk.org/c/asterisk/+/15940/comment/3064e036_48071b98 
PS2, Line 244: 	
> Whitespace.
Done


https://gerrit.asterisk.org/c/asterisk/+/15940/comment/bde9bf7b_9fabc26c 
PS2, Line 252: 			tmp = strchr(text, '='); /* use = sign to separate var value from name */
             : 			if (!tmp) {
             : 				ast_log(LOG_ERROR, "Variable syntax error: %s\n", tmp);
             : 				goto return_cleanup;
             : 			}
             : 			*tmp = '\0';
             : 			varname = text;
             : 			tmp = ast_skip_blanks(tmp + 1);
             : 			varvalue = tmp;
             : 			tmp = strchr(varvalue, '^'); /* start of the next variable, if there is one */
             : 			if (tmp) {
             : 				*tmp = '\0';
             : 				text = ast_skip_blanks(tmp + 1); /* for the next variable */
             : 			} else {
             : 				text = NULL; /* this was the last variable */
             : 			}
> Take a look at ast_strsep().  It does some of this work for you.  Also take a look at app.h. […]
Done



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia64cfe97d2792bcbf4775b3126cad662922a8b66
Gerrit-Change-Number: 15940
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Fri, 28 May 2021 17:28:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210528/11384d75/attachment-0001.html>


More information about the asterisk-code-review mailing list