[asterisk-commits] tilghman: trunk r247841 - /trunk/res/res_speech.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 18 17:13:51 CST 2010


Author: tilghman
Date: Thu Feb 18 17:13:46 2010
New Revision: 247841

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247841
Log:
Revert an errant part of a previous cleanup, to fix a memory corruption issue.

(closes issue #16368)
 Reported by: thirionjwf
 Patches: 
       res_speech.c.patch uploaded by thirionjwf (license 955)

Modified:
    trunk/res/res_speech.c

Modified: trunk/res/res_speech.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_speech.c?view=diff&rev=247841&r1=247840&r2=247841
==============================================================================
--- trunk/res/res_speech.c (original)
+++ trunk/res/res_speech.c Thu Feb 18 17:13:46 2010
@@ -313,8 +313,9 @@
 			/* We have our engine... removed it */
 			AST_RWLIST_REMOVE_CURRENT(list);
 			/* If this was the default engine, we need to pick a new one */
-			if (!default_engine)
+			if (engine == default_engine) {
 				default_engine = AST_RWLIST_FIRST(&engines);
+			}
 			ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name);
 			/* All went well */
 			res = 0;




More information about the asterisk-commits mailing list