Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent grammar handling #20

Merged
merged 9 commits into from
Feb 18, 2025
Merged
Prev Previous commit
Next Next commit
asr grammar locks imprvs
  • Loading branch information
danielslavetskiy committed Feb 17, 2025
commit 8c2af3efdf11fc18c1fdb85548c27202a9239c9f
2 changes: 1 addition & 1 deletion mod_unimrcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2478,9 +2478,9 @@ static switch_status_t recog_channel_enable_grammar(speech_channel_t *schannel,
if (zstr(grammar_name)) {
status = SWITCH_STATUS_FALSE;
} else {
switch_mutex_lock(schannel->mutex);
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
grammar_t *grammar;
switch_mutex_lock(schannel->mutex);
grammar = (grammar_t *) switch_core_hash_find(r->grammars, grammar_name);
if (grammar == NULL)
{
Expand Down