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

Friendly Automation asteriskteam at digium.com
Tue Mar 5 08:54:10 CST 2019


Friendly Automation has submitted this change and it was merged. ( 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).

ASTERISK-28323 #close

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

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/contrib/scripts/sip_to_pjsip/astconfigparser.py b/contrib/scripts/sip_to_pjsip/astconfigparser.py
index 949acdb..ee857e2 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 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)

-- 
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: 3
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190305/0ec460a1/attachment.html>


More information about the asterisk-code-review mailing list