aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_speech.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-31 16:17:09 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-31 16:17:09 +0000
commit7dde2a6eed26aeec6da97a477d310f55423b77be (patch)
tree9fa56d80f60bd4cbe7dd3411c245bfe11d862e0a /res/res_speech.c
parent014ef1baf579c9aeda8a7755385aebe4cdcb97c2 (diff)
Add a flag to the speech API that allows an engine to set whether it received results or not.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77831 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_speech.c')
-rw-r--r--res/res_speech.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_speech.c b/res/res_speech.c
index 16673538b..73dfe8dec 100644
--- a/res/res_speech.c
+++ b/res/res_speech.c
@@ -120,7 +120,7 @@ struct ast_speech_result *ast_speech_results_get(struct ast_speech *speech)
{
struct ast_speech_result *result = NULL;
- if (speech->engine->get != NULL) {
+ if (speech->engine->get != NULL && ast_test_flag(speech, AST_SPEECH_HAVE_RESULTS)) {
result = speech->engine->get(speech);
}
@@ -160,6 +160,7 @@ void ast_speech_start(struct ast_speech *speech)
/* Clear any flags that may affect things */
ast_clear_flag(speech, AST_SPEECH_SPOKE);
ast_clear_flag(speech, AST_SPEECH_QUIET);
+ ast_clear_flag(speech, AST_SPEECH_HAVE_RESULTS);
/* If results are on the structure, free them since we are starting again */
if (speech->results != NULL) {