[Asterisk-code-review] Codecs: strip codec name while parsing allow/disallow options (asterisk[13])

Joshua Colp asteriskteam at digium.com
Mon Apr 18 05:31:10 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: Codecs: strip codec name while parsing allow/disallow options
......................................................................


Codecs: strip codec name while parsing allow/disallow options

Failed registration using PJSIP/Realtime if one of the codec name
in allow/disallow option is wrong or contains space.

This patch strip codec name.

ASTERISK-25914

Change-Id: Ifdf02de94e5ddbce305640f6f0666084a3b9283d
---
M main/format_cap.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved
  Matthew Fredrickson: Looks good to me, but someone else must approve



diff --git a/main/format_cap.c b/main/format_cap.c
index 17ae18c..bf3bd1c 100644
--- a/main/format_cap.c
+++ b/main/format_cap.c
@@ -376,7 +376,7 @@
 	}
 
 
-	while ((this = strsep(&parse, ",|"))) {
+	while ((this = ast_strip(strsep(&parse, ",|")))) {
 		int framems = 0;
 		struct ast_format *format = NULL;
 

-- 
To view, visit https://gerrit.asterisk.org/2572
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdf02de94e5ddbce305640f6f0666084a3b9283d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>



More information about the asterisk-code-review mailing list