mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
fix case sensitivity issue in codecs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
6
frame.c
6
frame.c
@@ -499,11 +499,11 @@ int ast_getformatbyname(char *name)
|
|||||||
{
|
{
|
||||||
int x = 0, all = 0, format = 0;
|
int x = 0, all = 0, format = 0;
|
||||||
|
|
||||||
all = strcmp(name, "all") ? 0 : 1;
|
all = strcasecmp(name, "all") ? 0 : 1;
|
||||||
for (x = 0 ; x < sizeof(AST_FORMAT_LIST) / sizeof(struct ast_format_list) ; x++) {
|
for (x = 0 ; x < sizeof(AST_FORMAT_LIST) / sizeof(struct ast_format_list) ; x++) {
|
||||||
if(AST_FORMAT_LIST[x].visible && (all ||
|
if(AST_FORMAT_LIST[x].visible && (all ||
|
||||||
!strcmp(AST_FORMAT_LIST[x].name,name) ||
|
!strcasecmp(AST_FORMAT_LIST[x].name,name) ||
|
||||||
!strcmp(AST_FORMAT_LIST[x].name,ast_expand_codec_alias(name)))) {
|
!strcasecmp(AST_FORMAT_LIST[x].name,ast_expand_codec_alias(name)))) {
|
||||||
format |= AST_FORMAT_LIST[x].bits;
|
format |= AST_FORMAT_LIST[x].bits;
|
||||||
if(!all)
|
if(!all)
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user