[asterisk-commits] kmoore: branch 11 r385582 - /branches/11/codecs/codec_resample.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 12 17:25:41 CDT 2013
Author: kmoore
Date: Fri Apr 12 17:25:38 2013
New Revision: 385582
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385582
Log:
Allow codec_resample to be unloaded
Ensure that trans_size is correct to prevent uninitialized entries from
preventing reload.
(closes issue ASTERISK-21401)
Reported by: Corey Farrell
Tested by: Corey Farrell
Patches:
codec_resample-unload.patch uploaded by Corey Farrell
Modified:
branches/11/codecs/codec_resample.c
Modified: branches/11/codecs/codec_resample.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/codecs/codec_resample.c?view=diff&rev=385582&r1=385581&r2=385582
==============================================================================
--- branches/11/codecs/codec_resample.c (original)
+++ branches/11/codecs/codec_resample.c Fri Apr 12 17:25:38 2013
@@ -113,7 +113,7 @@
int res = 0;
int x, y, idx = 0;
- trans_size = ARRAY_LEN(id_list) * ARRAY_LEN(id_list);
+ trans_size = ARRAY_LEN(id_list) * (ARRAY_LEN(id_list) - 1);
if (!(translators = ast_calloc(1, sizeof(struct ast_translator) * trans_size))) {
return AST_MODULE_LOAD_FAILURE;
}
More information about the asterisk-commits
mailing list