[asterisk-dev] Comments in extensions.conf with 2 dashes behind semicolon not being ignored when parsed?

Jared Smith jsmith at digium.com
Wed May 28 16:19:53 CDT 2008


On Wed, 2008-05-28 at 15:56 -0500, JR Richardson wrote:
> I use allot of comments throughout my config files, as I suspect most
> people do.  I just happened on a situation where a comment crashed my
> dial plan.  Here is the example in extensions.conf:
> 
> ;-some comment (1 dash)
> works, ignored
> 
> ;--some comment (2 dashes)
> get a parse error at the CLI:

Block comments in Asterisk begin with ;-- (semicolon-hyphen-hyphen), and
end with --; (hyphen-hyphen-semicolon).  In this case, Asterisk found
the beginning of a block comment, but didn't find the end, so it threw a
parse error.

For those not familiar with block comments, they're comments that can
span multiple lines, like this:

;-- this is a block comment
that spans multiple lines
and ends here --;


-- 
Jared Smith
Training Manager
Digium, Inc.




More information about the asterisk-dev mailing list