Merged revisions 146802 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
  r146802 | tilghman | 2008-10-06 16:09:05 -0500 (Mon, 06 Oct 2008) | 15 lines
  
  Merged revisions 146799 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines
    
    Dialplan functions should not actually return 0, unless they have modified the
    workspace.  To signal an error (and no change to the workspace), -1 should be
    returned instead.
    (closes issue #13340)
     Reported by: kryptolus
     Patches: 
           20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@146838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-10-06 21:32:42 +00:00
parent 4da4c9cbcd
commit deb3c05634
11 changed files with 51 additions and 13 deletions

View File

@@ -202,6 +202,8 @@ static int speech_text(struct ast_channel *chan, const char *cmd, char *data,
if (result->text != NULL) {
ast_copy_string(buf, result->text, len);
} else {
buf[0] = '\0';
}
return 0;
@@ -230,6 +232,8 @@ static int speech_grammar(struct ast_channel *chan, const char *cmd, char *data,
if (result->grammar != NULL) {
ast_copy_string(buf, result->grammar, len);
} else {
buf[0] = '\0';
}
return 0;
@@ -330,6 +334,8 @@ static int speech_read(struct ast_channel *chan, const char *cmd, char *data,
results++;
snprintf(tmp, sizeof(tmp), "%d", results);
ast_copy_string(buf, tmp, len);
} else {
buf[0] = '\0';
}
return 0;