Skip to content

Commit

Permalink
Fixed a crash in processing of on_terminate_event() in res_speech_uni…
Browse files Browse the repository at this point in the history
…mrcp. Issue #13.

Such an event occurs when MRCP server unexpectedly disconnects while recognition is in progress.
  • Loading branch information
achaloyan committed Jun 30, 2017
1 parent c6ae353 commit 68bebdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion res-speech-unimrcp/res_speech_unimrcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,8 @@ static apt_bool_t on_message_receive(mrcp_application_t *application, mrcp_sessi
/** \brief Received unexpected session/channel termination event */
static apt_bool_t on_terminate_event(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel)
{
uni_speech_t *uni_speech = mrcp_application_channel_object_get(channel);
struct ast_speech *speech = mrcp_application_session_object_get(session);
uni_speech_t *uni_speech = speech->data;
ast_log(LOG_WARNING, "(%s) Received unexpected session termination event\n",uni_speech->name);
return TRUE;
}
Expand Down

1 comment on commit 68bebdd

@scgm11
Copy link

@scgm11 scgm11 commented on 68bebdd Jul 3, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the fix solves the issue

Please sign in to comment.