aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:37:29 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:37:29 +0000
commitab2468f263d17b88a43bdae9fcc9d8df5c08fdbe (patch)
tree65942df57f9d1be717550ef7432d88d797fce4f5
parent6a49bde78670f909d414a6f5053832982f83eea2 (diff)
Merged revisions 289424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r289424 | russell | 2010-09-30 10:34:29 -0500 (Thu, 30 Sep 2010) | 8 lines 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-2587 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@289425 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_sms.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c
index bbf014065..3d79bf65f 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -2039,6 +2039,12 @@ static int sms_exec(struct ast_channel *chan, void *data)
}
res = h.err; /* XXX */
+ /*
+ * 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);
+
sms_log(&h, '?'); /* log incomplete message */
done:
return (res);