static apt_bool_t mrcp_app_session_terminate_raise(mrcp_client_session_t *session, mrcp_sig_status_code_e status) { int i; mrcp_channel_t *channel; for(i=0; i<session->channels->nelts; i++) { channel = ((mrcp_channel_t**)session->channels->elts)[i]; if(!channel) continue; if(channel->control_channel) { mrcp_client_control_channel_destroy(channel->control_channel); channel->control_channel = NULL; } } mrcp_client_session_remove(session->application->client,session); /* raise app response */ return mrcp_app_sig_response_raise(session,status,TRUE); }
static apt_bool_t mrcp_app_session_terminate_raise(mrcp_client_session_t *session, mrcp_sig_status_code_e status) { int i; mrcp_channel_t *channel; for(i=0; i<session->channels->nelts; i++) { channel = APR_ARRAY_IDX(session->channels,i,mrcp_channel_t*); if(!channel) continue; if(channel->control_channel) { mrcp_client_control_channel_destroy(channel->control_channel); channel->control_channel = NULL; } } mrcp_client_session_remove(session->application->client,session); /* raise app response */ if(status != MRCP_SIG_STATUS_CODE_SUCCESS) { session->status = status; } return mrcp_app_sig_response_raise(session,FALSE); }