[asterisk-commits] russell: branch 1.4 r289424 - /branches/1.4/apps/app_sms.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 30 10:34:33 CDT 2010


Author: russell
Date: Thu Sep 30 10:34:29 2010
New Revision: 289424

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=289424
Log:
Fix a crash in app_sms.

Since the data being passed to the generator callback is on the stack of the
SMS() application, we must ensure that the generator is stopped before the
application exits.

ABE-2543

Modified:
    branches/1.4/apps/app_sms.c

Modified: branches/1.4/apps/app_sms.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/apps/app_sms.c?view=diff&rev=289424&r1=289423&r2=289424
==============================================================================
--- branches/1.4/apps/app_sms.c (original)
+++ branches/1.4/apps/app_sms.c Thu Sep 30 10:34:29 2010
@@ -1506,6 +1506,12 @@
 
 	sms_log (&h, '?');			  /* log incomplete message */
 
+	/* 
+	 * The SMS generator data is on the stack.  We _MUST_ make sure the generator
+	 * is stopped before returning from this function.
+	 */
+	ast_deactivate_generator(chan);
+
 	ast_module_user_remove(u);
 	return (h.err);
 }




More information about the asterisk-commits mailing list