[asterisk-dev] case sensitivity with global variables

Tilghman Lesher tlesher at digium.com
Wed Jun 16 12:55:23 CDT 2010


Please don't reply both to me AND to the list.  That gives me two copies of
message, which I do not need.

On Wednesday 16 June 2010 12:23:13 Klaus Darilion wrote:
> I have update to 1.6.2-branch and tested again:
>
> Set(FOO=BAR);
> Verbose(${FOO});          BAR
> Verbose(${foo});          BAR
> Set(foo=bar);
> Verbose(${FOO});          bar
> Verbose(${foo});          bar
>
> Set(GLOBAL(FOO2)=BAR);
> Verbose(${GLOBAL(FOO2)});  BAR
> Verbose(${GLOBAL(foo2)});  <null>
> Set(GLOBAL(foo2)=bar);
> Verbose(${GLOBAL(FOO2)});  BAR
> Verbose(${GLOBAL(foo2)});  bar
> Verbose(${FOO2});          bar
> Verbose(${foo2});          bar
>
> So it seems that global variables, when handled via the GLOBAL function,
> are now case sensitive.
>
> But normal channel variables, and global channel variables accessed
> directly, are still case insensitive.

Well, it looks like there's at least one other place where it was assumed to
be case-insensitive, although I think it makes much more sense for it to be
case-sensitive.  It has been inconsistent in Asterisk for a long time, and I
cannot find any included documentation which states which way it should be,
so I'll just ask the question:  does anybody feel strongly that Asterisk
variables should be case-insensitive?  If not, I'll fix this remaining case
update the documentation.  If anybody has strong feelings, now would be
the time to make your case and have that discussion.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list