[Asterisk-cvs] asterisk translate.c,1.13,1.13.2.1
citats at lists.digium.com
citats at lists.digium.com
Wed Feb 25 20:24:38 CST 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4070
Modified Files:
Tag: v1-0_stable
translate.c
Log Message:
Fix 'show translations' in -stable
Index: translate.c
===================================================================
RCS file: /usr/cvsroot/asterisk/translate.c,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -d -r1.13 -r1.13.2.1
--- translate.c 16 Aug 2003 15:47:53 -0000 1.13
+++ translate.c 26 Feb 2004 01:13:35 -0000 1.13.2.1
@@ -264,17 +264,16 @@
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 >= 99999 ? tr_matrix[x][y].cost-99999 : 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)) );
- } else if (x != -1 && y != -1 && y != 4) {
- snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
- } else if (y != 4) {
- snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
+ " %5s", ast_getformatname(1<<(x+y+1)) );
+ } else if (x != -1 && y != -1 ) {
+ snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
+ } else {
+ snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
}
}
snprintf(line + strlen(line), sizeof(line) - strlen(line), "\n");
More information about the svn-commits
mailing list