1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-04-26 12:37:26 +00:00

make sure the bug is read before we start to read from it otherwise we segfault

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9002 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-07-12 15:27:34 +00:00
parent c00d1fb8e4
commit 060d86c029

@ -1637,12 +1637,14 @@ static switch_bool_t speech_callback(switch_media_bug_t *bug, void *user_data, s
return SWITCH_FALSE;
}
if (switch_core_asr_check_results(sth->ah, &flags) == SWITCH_STATUS_SUCCESS) {
if (sth->mutex && sth->cond && sth->ready) {
switch_mutex_lock(sth->mutex);
switch_thread_cond_signal(sth->cond);
switch_mutex_unlock(sth->mutex);
}
}
}
}
break;
case SWITCH_ABC_TYPE_WRITE:
default: