]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Codecs: strip codec name while parsing allow/disallow options 18/2618/1
authorAlexei Gradinari <alex2grad@gmail.com>
Mon, 11 Apr 2016 21:20:49 +0000 (17:20 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Thu, 14 Apr 2016 21:35:56 +0000 (16:35 -0500)
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

main/format_cap.c

index d3e87fafd0af301542bddfad0dfec23a50e7f11c..2b3e6cd5f87646b7a4f4f905aeb1204ee9405283 100644 (file)
@@ -342,7 +342,7 @@ int ast_format_cap_update_by_allow_disallow(struct ast_format_cap *cap, const ch
        }
 
 
-       while ((this = strsep(&parse, ",|"))) {
+       while ((this = ast_strip(strsep(&parse, ",|")))) {
                int framems = 0;
                struct ast_format *format = NULL;