Summary:ASTERISK-08022: [patch] [1.4] Fix "core show translation" output
Reporter:damin (damin)Labels:
Date Opened:2006-10-28 21:28:56Date Closed:2006-10-31 18:03:54.000-0600
Versions:Frequency of
Environment:Attachments:( 0) core-show-translation-patch-2006-10-28.txt
Description:The code to build the display buffer for "core show translation" and "show translation" assumes an 80 character line length. With the addition of the g722 codec, the line length is actually 81, causing the last two characters ("2\n") to be chopped off. This results in the display being incorrectly formatted due to the missing newline. This patch increases the line buffer to 120 characters (who uses 80 character terminals anymore?) which corrects the display.


Something to consider.. In the future, we may add more codecs. Perhaps the line length should be calculated based on the size of the terminal window?
Comments:By: Jason Parker (jparker) 2006-10-28 22:12:20

I had an idea which I ended up not really liking once I saw it, but here it is anyways.  Basically, I made the text "sideways", which ended up making it 62 (printable) chars instead of 81 or whatever it was before.  This is no longer dynamic (in most places..), and it allows 3 chars (plus a space) for the time.  Opinions?  Suggestions?

[Edit: Yay HTML!  That made this look horrible...  Fine, I'll pastebin it.]


By: Russell Bryant (russell) 2006-10-31 00:34:22.000-0600

qwell, I think that looks fine.  I say commit away!

By: Jason Parker (jparker) 2006-10-31 08:24:50.000-0600

I have to write a patch first. ;)

I'll see what I can do.

By: Russell Bryant (russell) 2006-10-31 10:00:03.000-0600

Ha, I thought you had already written the patch... Well, the "idea" gets my vote, then.

By: Jason Parker (jparker) 2006-10-31 16:08:21.000-0600

Fixed in 1.4 revision 46716 and trunk revision 46718 - using originally suggested patch.  Kevin said that it wouldn't really be worth the time to hack it up, since it'll still happen again in the future.

By: damin (damin) 2006-10-31 18:03:54.000-0600

Woo Hoo! My first real C patch! ;)