[asterisk-dev] Opinions Needed: Case sensitivity in config file section names

George Joseph george.joseph at fairview5.com
Tue Sep 23 12:47:19 CDT 2014


On Tue, Sep 23, 2014 at 11:13 AM, Matthew Jordan <mjordan at digium.com> wrote:

>
>
> On Tue, Sep 23, 2014 at 11:29 AM, Paul Belanger <
> paul.belanger at polybeacon.com> wrote:
>
>> On Tue, Sep 23, 2014 at 11:45 AM, George Joseph
>> <george.joseph at fairview5.com> wrote:
>> > I've been working on some changes for config.c and in the process I've
>> found
>> > 5 instances of someone attempting to do "cat->name == category_name"
>> instead
>> > of "strcmp(cat->name, category_name)".    Example:
>> >
>>
> <snip>

> > My question is...  Should I fix these so the case sensitive match works
>> and
>> > runs first or just remove the first loop so the match is always
>> > case-insensitive?   I'm hoping the latter not only because it makes the
>> code
>> > simpler but because that's how it's worked for years and suddenly
>> making the
>> > match case sensitive might cause unexpected problems.
>> >
>> > Thoughts?
>> >
>> For me, case sensitive.  Because I config files that do have:
>>
>> [Foo]
>>
>> [foo]
>>
>> [fOO]
>>
>> don't ask, long story.
>>
>>
>
Which file?  I'd like to test a before and after scenario to make sure
whatever I change still works.


> And it currently works? :-D
>
> (Just kidding)
>
> If that is the case, then obviously any change we make here should be done
> to trunk only.
>
> I'll leave the impending case-war to others... :-)
>
>
Ok, I think I'll fix the ones that are definitely broken so they do case
sensitive first then fall back to case insensitive.   That should preserve
the current behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140923/26832a38/attachment.html>


More information about the asterisk-dev mailing list