[Asterisk-code-review] sip_to_pjsip: Make multiline comment parsing consistent with Asterisk (...asterisk[13])

Sean Bright asteriskteam at digium.com
Mon Mar 4 12:39:40 CST 2019


Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11091


Change subject: sip_to_pjsip: Make multiline comment parsing consistent with Asterisk
......................................................................

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).

Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72
---
M contrib/scripts/sip_to_pjsip/astconfigparser.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/11091/1

diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py
index 949acdb..2d527cc 100644
--- a/contrib/scripts/sip_to_pjsip/astconfigparser.py
+++ b/contrib/scripts/sip_to_pjsip/astconfigparser.py
@@ -180,7 +180,7 @@
         return "", True
 
     part = line.partition(COMMENT_START)
-    if part[1]:
+    if part[1] and part[2][0] != '-':
         # 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)

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11091
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I32dc38e0fac01d3c0805d27d35d2365a7c37ca72
Gerrit-Change-Number: 11091
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190304/1598ce99/attachment.html>


More information about the asterisk-code-review mailing list