summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-02-03 00:29:46 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-02-03 00:29:46 +0000
commitf71322f239acc308d713a6a73aed0c6009fb9e77 (patch)
treeccf2529598d647d5b802c71c3627ed1f294c2c68 /apps
parent274032620051cf36d7bca098a85b25ae4a239515 (diff)
Merged revisions 305923 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r305923 | rmudgett | 2011-02-02 18:24:40 -0600 (Wed, 02 Feb 2011) | 24 lines Merged revisions 305889 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r305889 | rmudgett | 2011-02-02 18:15:07 -0600 (Wed, 02 Feb 2011) | 17 lines Merged revisions 305888 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r305888 | rmudgett | 2011-02-02 18:02:43 -0600 (Wed, 02 Feb 2011) | 8 lines Minor AST_FRAME_TEXT related issues. * Include the null terminator in the buffer length. When the frame is queued it is copied. If the null terminator is not part of the frame buffer length, the receiver could see garbage appended onto it. * Add channel lock protection with ast_sendtext(). * Fixed AMI SendText action ast_sendtext() return value check. ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_sendtext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 99dbeea7e..2624fe505 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -98,10 +98,10 @@ static int sendtext_exec(struct ast_channel *chan, const char *data)
return 0;
}
status = "FAILURE";
- ast_channel_unlock(chan);
if (!ast_sendtext(chan, ast_str_buffer(str))) {
status = "SUCCESS";
}
+ ast_channel_unlock(chan);
pbx_builtin_setvar_helper(chan, "SENDTEXTSTATUS", status);
return 0;
}