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

N A asteriskteam at digium.com
Mon May 9 05:46:24 CDT 2022


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

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


Patch Set 4:

(1 comment)

Patchset:

PS4: 
> I think there's enough dissension about "reserved" that this shouldn't go in as is.
I removed the idea of "reserved" in patch set 4.
The only related function is a clever optimization, where since Asterisk-set variable names are always all uppercase, rather than iterating through the list of registered variables, we can bail early if the variable name contains lowercase letters, since we know it's a user variable and not an Asterisk variable in such case. There is literally no point in locking the list and traversing it, because we know we won't find it.

This doesn't necessarily mean the inverse: it's not saying that if variables are uppercase, it's reserved. That's why it goes and iterates through the list to check. If it doesn't find it registered, then that is that.



-- 
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: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
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: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Mon, 09 May 2022 10:46:24 +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/20220509/f228dc99/attachment-0001.html>


More information about the asterisk-code-review mailing list