Skip to content

Commit 4672a58

Browse files
committed
Return SWITCH_STATUS_BREAK instead of SWITCH_STATUS_FALSE in recog_channel_check_results() when no results are yet.
1 parent d4b2209 commit 4672a58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mod_unimrcp.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,19 +2542,19 @@ static switch_status_t recog_channel_disable_all_grammars(speech_channel_t *scha
25422542
*/
25432543
static switch_status_t recog_channel_check_results(speech_channel_t *schannel)
25442544
{
2545-
switch_status_t status = SWITCH_STATUS_SUCCESS;
2545+
switch_status_t status = SWITCH_STATUS_BREAK;
25462546
recognizer_data_t *r;
2547+
25472548
switch_mutex_lock(schannel->mutex);
2549+
25482550
r = (recognizer_data_t *) schannel->data;
25492551
if (!zstr(r->result)) {
25502552
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) SUCCESS, have result\n", schannel->name);
2551-
} else if (r->start_of_input == START_OF_INPUT_RECEIVED) {
2552-
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) SUCCESS, start of input\n", schannel->name);
2553-
} else {
2554-
status = SWITCH_STATUS_FALSE;
2553+
status = SWITCH_STATUS_SUCCESS;
25552554
}
25562555

25572556
switch_mutex_unlock(schannel->mutex);
2557+
25582558
return status;
25592559
}
25602560

0 commit comments

Comments
 (0)