From: Alexei Gradinari Date: Mon, 11 Apr 2016 21:20:49 +0000 (-0400) Subject: Codecs: strip codec name while parsing allow/disallow options X-Git-Tag: 13.9.0-rc1~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F2572%2F1;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/format_cap.c b/main/format_cap.c index 17ae18cd47..bf3bd1c4bf 100644 --- a/main/format_cap.c +++ b/main/format_cap.c @@ -376,7 +376,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;