mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Add a flag to the speech API that allows an engine to set whether it received results or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user