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/branches/1.8@305923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2011-02-03 00:24:40 +00:00
parent 70edcdef43
commit a785544090
4 changed files with 9 additions and 6 deletions

View File

@@ -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;
}