提交 dc5c28e1 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7853 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 975fec22
...@@ -636,7 +636,9 @@ static switch_status_t sofia_kill_channel(switch_core_session_t *session, int si ...@@ -636,7 +636,9 @@ static switch_status_t sofia_kill_channel(switch_core_session_t *session, int si
{ {
private_object_t *tech_pvt = switch_core_session_get_private(session); private_object_t *tech_pvt = switch_core_session_get_private(session);
switch_assert(tech_pvt != NULL); if (!tech_pvt) {
return SWITCH_STATUS_FALSE;
}
switch (sig) { switch (sig) {
case SWITCH_SIG_BREAK: case SWITCH_SIG_BREAK:
......
...@@ -40,6 +40,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor ...@@ -40,6 +40,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
switch_io_event_hook_video_write_frame_t *ptr; switch_io_event_hook_video_write_frame_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
switch_io_flag_t flags = 0; switch_io_flag_t flags = 0;
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
if (session->endpoint_interface->io_routines->write_video_frame) { if (session->endpoint_interface->io_routines->write_video_frame) {
if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, timeout, flags, stream_id)) == SWITCH_STATUS_SUCCESS) { if ((status = session->endpoint_interface->io_routines->write_video_frame(session, frame, timeout, flags, stream_id)) == SWITCH_STATUS_SUCCESS) {
for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) { for (ptr = session->event_hooks.video_write_frame; ptr; ptr = ptr->next) {
...@@ -57,6 +62,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core ...@@ -57,6 +62,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
switch_io_event_hook_video_read_frame_t *ptr; switch_io_event_hook_video_read_frame_t *ptr;
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
if (session->endpoint_interface->io_routines->read_video_frame) { if (session->endpoint_interface->io_routines->read_video_frame) {
if ((status = if ((status =
session->endpoint_interface->io_routines->read_video_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) { session->endpoint_interface->io_routines->read_video_frame(session, frame, timeout, SWITCH_IO_FLAG_NOOP, stream_id)) == SWITCH_STATUS_SUCCESS) {
...@@ -97,6 +106,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -97,6 +106,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
unsigned int flag = 0; unsigned int flag = 0;
top: top:
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
status = SWITCH_STATUS_FALSE; status = SWITCH_STATUS_FALSE;
need_codec = perfect = 0; need_codec = perfect = 0;
...@@ -466,6 +480,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess ...@@ -466,6 +480,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
switch_assert(session != NULL); switch_assert(session != NULL);
switch_assert(frame != NULL); switch_assert(frame != NULL);
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
if (switch_channel_test_flag(session->channel, CF_HOLD)) { if (switch_channel_test_flag(session->channel, CF_HOLD)) {
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
...@@ -917,6 +934,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(switch_core_sessio ...@@ -917,6 +934,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_recv_dtmf(switch_core_sessio
switch_status_t status; switch_status_t status;
switch_dtmf_t new_dtmf; switch_dtmf_t new_dtmf;
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
switch_assert(dtmf); switch_assert(dtmf);
new_dtmf = *dtmf; new_dtmf = *dtmf;
...@@ -943,6 +964,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio ...@@ -943,6 +964,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_sessio
switch_status_t status = SWITCH_STATUS_FALSE; switch_status_t status = SWITCH_STATUS_FALSE;
switch_dtmf_t new_dtmf; switch_dtmf_t new_dtmf;
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
switch_assert(dtmf); switch_assert(dtmf);
new_dtmf = *dtmf; new_dtmf = *dtmf;
...@@ -983,9 +1008,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf_string(switch_core ...@@ -983,9 +1008,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf_string(switch_core
int i, argc; int i, argc;
char *argv[256]; char *argv[256];
switch_assert(session != NULL); switch_assert(session != NULL);
if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
return SWITCH_STATUS_FALSE;
}
if (switch_strlen_zero(dtmf_string)) { if (switch_strlen_zero(dtmf_string)) {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论