mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
Fix "core show translation" to not output information for "unknown" codecs.
This fix was made in favor of the proposed patch since it doesn't involve changing a core codec define. (closes issue #11722, reported and initially patched by caio1982, final patch by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -557,9 +557,14 @@ static char *handle_cli_core_show_translation(struct ast_cli_entry *e, int cmd,
|
||||
}
|
||||
for (x = -1; x < SHOW_TRANS; x++) {
|
||||
struct ast_str *out = ast_str_alloca(120);
|
||||
|
||||
/*Go ahead and move to next iteration if dealing with an unknown codec*/
|
||||
if(x >= 0 && !strcmp(ast_getformatname(1 << (x)), "unknown"))
|
||||
continue;
|
||||
ast_str_set(&out, -1, " ");
|
||||
for (y = -1; y < SHOW_TRANS; y++) {
|
||||
/*Go ahead and move to next iteration if dealing with an unknown codec*/
|
||||
if (y >= 0 && !strcmp(ast_getformatname(1 << (y)), "unknown"))
|
||||
continue;
|
||||
if (y >= 0)
|
||||
curlen = strlen(ast_getformatname(1 << (y)));
|
||||
if (curlen < 5)
|
||||
|
Reference in New Issue
Block a user