[asterisk-commits] kmoore: trunk r385585 - in /trunk: ./ codecs/codec_resample.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Apr 12 17:26:20 CDT 2013


Author: kmoore
Date: Fri Apr 12 17:26:17 2013
New Revision: 385585

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385585
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
........

Merged revisions 385582 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/codecs/codec_resample.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/codecs/codec_resample.c
URL: http://svnview.digium.com/svn/asterisk/trunk/codecs/codec_resample.c?view=diff&rev=385585&r1=385584&r2=385585
==============================================================================
--- trunk/codecs/codec_resample.c (original)
+++ trunk/codecs/codec_resample.c Fri Apr 12 17:26:17 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