aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_sms.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:40:10 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-30 15:40:10 +0000
commitc3136e840c63b14a23522a49ca49193fed9af20a (patch)
tree8e1370f29deb5fa1ea9d337e2e5d0f4edab7f7fc /apps/app_sms.c
parented98462df23f3bccb3dd0b40ac88c96c0af35e32 (diff)
Merged revisions 289426 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r289426 | russell | 2010-09-30 10:39:45 -0500 (Thu, 30 Sep 2010) | 22 lines Merged revisions 289425 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r289425 | russell | 2010-09-30 10:37:29 -0500 (Thu, 30 Sep 2010) | 15 lines 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/trunk@289427 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_sms.c')
-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 aee2fa6c5..b5c471b8e 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -2040,6 +2040,12 @@ static int sms_exec(struct ast_channel *chan, const char *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);