[sr-dev] [kamailio/kamailio] Dump Configuration and Exit (new flag -C [filename]) (#2546)

Daniel-Constantin Mierla miconda at gmail.com
Tue Nov 10 15:20:09 CET 2020


On 10.11.20 14:52, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> So for now, if someone doesn't want the #!KAMAILIO (or the other
>> variants) in the first line, can add it temporarily only when it uses
>> the --cfg-print, then remove it. Of course, if someone wants to look
>> more into it, is more than welcome to make pull requests.
> It is OK to have that in the first line, but my question was, can there
> be something else on the first line after #!KAMAILIO?  So is the test
>
>   first_line == "#!KAMAILIO"
>
> or
>
>   starts_with(first_line, "#!KAMAILIO")
>
> ?

Flex does token based parsing -- I haven't tried it, but it should work
even if it is something before or after it. More constraints can be
added, e.g., to be at the beginning of the line, or the only content in
the line, but currently the cfg.lex doesn't have any.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla




More information about the sr-dev mailing list