Summary: | ASTERISK-03352: [patch] Fix typo in show_codec_n in frame.c | ||
Reporter: | Kenneth Shumard (kshumard) | Labels: | |
Date Opened: | 2005-01-25 19:32:51.000-0600 | Date Closed: | 2008-01-15 15:23:32.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 3427-stable.patch.txt ( 1) frame.c.show_codec_n.patch | |
Description: | The call to ast_codec2str as an argument to ast_cli in show_codec_n is broken. The output to the cli should be the codec at index (1 << i); the actual output is the codec at index i. This patch replaces "i" with "1 << i". ****** ADDITIONAL INFORMATION ****** In the cli, "show codec n" outputs the codec at the log(base 2) ith index (ie, 1 == unknown, 2 == g723, ..., 16 == ulaw). It seems more intuitive to me to have it output the codec at the ith index (ie, 0 == g723, 1 == gsm, ..., 10 == ilbc, etc). I've written this patch as well, but I'm not sure what I consider intuitive agrees with the majority. Say the word and I'll post that, too. | ||
Comments: | By: Mark Spencer (markster) 2005-01-25 20:44:16.000-0600 Fixed in CVS head. The advantage of using the mask is that you can show a mask (e.g. show codec 99) By: rwjblue (rwjblue) 2005-01-26 11:06:52.000-0600 added patch for STABLE By: Russell Bryant (russell) 2005-01-27 19:17:14.000-0600 fixed in 1.0 By: Digium Subversion (svnbot) 2008-01-15 15:23:13.000-0600 Repository: asterisk Revision: 4893 U trunk/frame.c ------------------------------------------------------------------------ r4893 | markster | 2008-01-15 15:23:13 -0600 (Tue, 15 Jan 2008) | 2 lines Fix show_codec_n (bug ASTERISK-3352) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4893 By: Digium Subversion (svnbot) 2008-01-15 15:23:23.000-0600 Repository: asterisk Revision: 4904 U branches/v1-0/frame.c ------------------------------------------------------------------------ r4904 | russell | 2008-01-15 15:23:22 -0600 (Tue, 15 Jan 2008) | 2 lines fix 'show codec' (bug ASTERISK-3352) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4904 By: Digium Subversion (svnbot) 2008-01-15 15:23:32.000-0600 Repository: asterisk Revision: 4913 U branches/v1-0/apps/app_dial.c ------------------------------------------------------------------------ r4913 | russell | 2008-01-15 15:23:31 -0600 (Tue, 15 Jan 2008) | 2 lines fix DIALEDPEERNUMBER (bug ASTERISK-3352) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4913 |