dect
/
asterisk
Archived
13
0
Fork 0

Don't be biased against G.726 in translation table

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2240 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-02-25 04:24:51 +00:00
parent 91a49dbd77
commit 5ab3234353
1 changed files with 6 additions and 7 deletions

View File

@ -264,17 +264,16 @@ static int show_translation(int fd, int argc, char *argv[])
for (x=-1;x<SHOW_TRANS; x++) {
strcpy(line, " ");
for (y=-1;y<SHOW_TRANS;y++) {
/* Skip MP3 (y = 4) as Destination format */
if (y != 4 && x >= 0 && y >= 0 && tr_matrix[x][y].step)
snprintf(line + strlen(line), sizeof(line) - strlen(line), " %6d", tr_matrix[x][y].cost);
if (x >= 0 && y >= 0 && tr_matrix[x][y].step)
snprintf(line + strlen(line), sizeof(line) - strlen(line), " %5d", tr_matrix[x][y].cost);
else
if ((y != 4) && ((x == -1 && y >= 0) || (y == -1 && x >= 0))) {
if (((x == -1 && y >= 0) || (y == -1 && x >= 0))) {
snprintf(line + strlen(line), sizeof(line) - strlen(line),
" %6s", ast_getformatname(1<<(x+y+1)) );
" %5s", ast_getformatname(1<<(x+y+1)) );
} else if (x != -1 && y != -1 && y != 4) {
snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
} else if (y != 4) {
snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
}
}
snprintf(line + strlen(line), sizeof(line) - strlen(line), "\n");