From: Sean Bright Date: Mon, 4 Mar 2019 18:36:01 +0000 (-0500) Subject: sip_to_pjsip: Make multiline comment parsing consistent with Asterisk X-Git-Tag: 13.26.0-rc1~30^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bcbc0bdfdd233c0f2029e821c57f63c29632345;p=thirdparty%2Fasterisk.git sip_to_pjsip: Make multiline comment parsing consistent with Asterisk In Asterisk configuration, a multiline comment starts with ;-- as long as it is not followed by another dash (i.e. ;--- is not a multiline comment). ASTERISK-28323 #close Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72 --- diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py index 949acdb5ab..ee857e2d6e 100644 --- a/contrib/scripts/sip_to_pjsip/astconfigparser.py +++ b/contrib/scripts/sip_to_pjsip/astconfigparser.py @@ -180,7 +180,7 @@ def remove_comment(line, is_comment): return "", True part = line.partition(COMMENT_START) - if part[1]: + if part[1] and not part[2].startswith('-'): # found multi-line comment start check string before # it to make sure there wasn't an eol comment in it has_comment = part[0].partition(COMMENT)