aboutsummaryrefslogtreecommitdiffstats
path: root/translate.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-25 04:24:51 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-02-25 04:24:51 +0000
commit5ab3234353ec730154f81651f131ad577d246c94 (patch)
tree441172d3b0087cde1c430e9dea351c2dfeebf301 /translate.c
parent91a49dbd77ef94e316d10913c950fbd3753581d2 (diff)
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
Diffstat (limited to 'translate.c')
-rwxr-xr-xtranslate.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/translate.c b/translate.c
index 0514bb984..c29788632 100755
--- a/translate.c
+++ b/translate.c
@@ -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");