[asterisk-dev] [Code Review]: Make dialplan variable evaluation case-sensitive

Tilghman Lesher reviewboard at asterisk.org
Fri Oct 19 16:29:09 CDT 2012



> On Oct. 18, 2012, 9:20 a.m., Joshua Colp wrote:
> > /trunk/channels/chan_mgcp.c, lines 853-859
> > <https://reviewboard.asterisk.org/r/2160/diff/3/?file=31850#file31850line853>
> >
> >     Huh, I wonder why this was done in the first place ... oh well, probably legacy and maybe pbx_builtin_getvar_helper didn't exist. Oh well!
> 
> Mark Michelson wrote:
>     My guesses:
>     
>     1) Yours. Perhaps pbx_builtin_getvar_helper did not exist.
>     2) This may have been used to get multiple variables. The loop was reduced more and more until it was only grabbing one variable.
>     
>     Either way, pbx_builtin_getvar_helper makes it much easier here.

3) The code was copied directly out of another channel that retrieved multiple variables, and the author knocked it down to just retrieve this one, not knowing the pbx_builtin_getvar_helper() is far easier.  pbx_builtin_getvar_helper() first appeared in version 0.3.0, and this ALERT_INFO variable was not added until a later version.


- Tilghman


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2160/#review7300
-----------------------------------------------------------


On Oct. 12, 2012, 1:04 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2160/
> -----------------------------------------------------------
> 
> (Updated Oct. 12, 2012, 1:04 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> For more information on this, see this companion wiki page: https://wiki.asterisk.org/wiki/display/AST/Case+Sensitivity
> 
> In this review, please comment both on the code change and the wiki page. I don't suspect there will be much to comment on in the code...
> 
> 
> This addresses bug ASTERISK-20163.
>     https://issues.asterisk.org/jira/browse/ASTERISK-20163
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_osplookup.c 374915 
>   /trunk/channels/chan_mgcp.c 374915 
>   /trunk/channels/chan_sip.c 374924 
>   /trunk/channels/chan_skinny.c 374915 
>   /trunk/funcs/func_strings.c 374915 
>   /trunk/main/pbx.c 374915 
> 
> Diff: https://reviewboard.asterisk.org/r/2160/diff
> 
> 
> Testing
> -------
> 
> I ran some calls where I set variables and ensured that they only evaluated to non-empty strings when the same case was used as when originally setting the variable.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121019/8fe89c87/attachment.htm>


More information about the asterisk-dev mailing list