[Asterisk-code-review] pbx_variables: Add variable registration and validation (asterisk[master])

Sean Bright asteriskteam at digium.com
Fri Jan 14 10:25:40 CST 2022


Attention is currently required from: N A, Kevin Harwell.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17792 )

Change subject: pbx_variables: Add variable registration and validation
......................................................................


Patch Set 1:

(1 comment)

File main/pbx_variables.c:

https://gerrit.asterisk.org/c/asterisk/+/17792/comment/3d5c0bbd_e733d797 
PS1, Line 155: int ast_varname_reserved(const char *name)
             : {
             : 	char *tmp = (char*) name;
             : 	/* Asterisk broadly reserves all uppercase + underscore var names for use by Asterisk */
             : 	while (*tmp) {
             : 		if (tmp[0] != '_' && !isupper(tmp[0])) {
             : 			return 0;
             : 		}
             : 		tmp++;
             : 	}
             : 	return 1;
             : }
> Au contraire, that *has* been the longstanding precedent

No it hasn't. Maybe in your circles but not among all asterisk users.

> and if users are truly free to do whatever now, that would be a change.

No it wouldn't.

> Administrators and users trying to do it 'correctly' avoid uppercase variable names, whether that's codified or not.

Maybe in your circles but not among all asterisk users.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iad3b8d9833c7d9debe04aca59260d7316c3ad28c
Gerrit-Change-Number: 17792
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Fri, 14 Jan 2022 16:25:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean at seanbright.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220114/4970f3f0/attachment-0001.html>


More information about the asterisk-code-review mailing list