[SR-Users] 3.1.x and Kamailio compatibility mode

Klaus Darilion klaus.mailinglists at pernau.at
Wed May 25 12:57:16 CEST 2011



On 25.05.2011 12:18, Daniel-Constantin Mierla wrote:
>
>
> On 5/25/11 12:11 PM, Klaus Darilion wrote:
>>
>>
>> On 25.05.2011 11:17, Daniel-Constantin Mierla wrote:
>>>
>>>
>>> On 5/25/11 10:55 AM, Henning Westerholt wrote:
>>>> On Tuesday 24 May 2011, Daniel-Constantin Mierla wrote:
>>>>>> Is #!KAMAILIO still necessary with Kamailio 3.1.x? If yes, which
>>>>>> behavior is changed by #!KAMAILIO?
>>>>> it is still good to turn on vim syntax highlighting :-) (if you
>>>>> installed the files from utils/misc/vim/ in ~/.vim/), otherwise is not
>>>>> changing any kind of proxy behaviour whether it is present or not.
>>>> Ok, don't want to neglect the syntax highlighting.. ;-) What about
>>>> removing
>>>> this define then if its not necessary anymore for the server?
>>> it is not a define like the other #!define, it is matched in the parser
>>> and an internal value is set.
>>>
>>> Probably it can be removed from the code, it should be harmless/useless
>>> there. But it is rather useful in the default config for syntax
>>> highlighting, being treated as a comment anyhow -- e.g., like in other
>>> cases, many c files have the vim formatting commands in comments.
>>
>> Does the define has to be in the first line of the config?
>>
>>
>> IMO we should add a comment like:
>>
>> # Above Kamailio define is only for vim syntax highlighting and
>> # can be removed.
> it is not a define, it is a comment. Like any comment, it can be safety
> removed - imo makes no sense to add such note.
>
> Only following tokens are pre-processor directives:
> - #!define, #!ifdef, #!ifndef, #!else, #!endif, #!subst
>
> So you can have your:
>
> #!my text here
>
> And it is simply comment. '#!' does not have a special meaning alone.
> '#' has, and it is start of comment line. The parser is working with
> longest match, so if pre-processor directives are not matched, then it
> is a comment line.

Sorry for being to unspecified.

The comment "#!KAMILIO" was used to activate the compatibility mode. 
With 3.1 release this is not needed anymore. Thus, I see 2 options:
a) remove it from the default config
b) keep it there (e.g. for people who like vim syntax highlighting) and 
add another comment which explains that the line can safely remove for 
kamailio >= 3.1. Otherwise people like me will be confused and afraid to 
remove the comment.

regards
Klaus



More information about the sr-users mailing list