From 32bbe11d6b9a74533aa730c65fa46654beee546b Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Wed, 8 Jan 2014 04:28:14 -0500 Subject: [PATCH] mod_rayo remove hack for stopping fax --- src/mod/event_handlers/mod_rayo/mod_rayo.c | 10 ---------- src/mod/event_handlers/mod_rayo/rayo_fax_components.c | 7 ++----- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c index d88cc26af0..9898191c70 100644 --- a/src/mod/event_handlers/mod_rayo/mod_rayo.c +++ b/src/mod/event_handlers/mod_rayo/mod_rayo.c @@ -3320,16 +3320,6 @@ static switch_status_t rayo_call_on_read_frame(switch_core_session_t *session, s switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Ending abandoned call. idle_duration_ms = %i ms\n", idle_duration_ms); switch_channel_hangup(channel, RAYO_CAUSE_HANGUP); } - - /* check for break request */ - { - const char *break_jid = switch_channel_get_variable(channel, "rayo_read_frame_interrupt"); - struct rayo_actor *actor; - if (break_jid && (actor = RAYO_LOCATE(break_jid))) { - RAYO_UNLOCK(actor); - return SWITCH_STATUS_FALSE; - } - } } return SWITCH_STATUS_SUCCESS; } diff --git a/src/mod/event_handlers/mod_rayo/rayo_fax_components.c b/src/mod/event_handlers/mod_rayo/rayo_fax_components.c index bce34dc9d9..4a4fc76f6b 100644 --- a/src/mod/event_handlers/mod_rayo/rayo_fax_components.c +++ b/src/mod/event_handlers/mod_rayo/rayo_fax_components.c @@ -206,7 +206,6 @@ static iks *start_sendfax_component(struct rayo_actor *call, struct rayo_message switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute"); switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "txfax"); switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", fax_document); - switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true"); if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) { switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA); } @@ -309,7 +308,6 @@ static iks *start_receivefax_component(struct rayo_actor *call, struct rayo_mess switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute"); switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "rxfax"); switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", receivefax_component->local_filename); - switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true"); if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) { switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA); } @@ -341,12 +339,11 @@ static iks *stop_fax_component(struct rayo_actor *component, struct rayo_message { iks *iq = msg->payload; switch_core_session_t *session = switch_core_session_locate(RAYO_COMPONENT(component)->parent->id); + FAX_COMPONENT(component)->stop = 1; if (session) { - /* fail on read frame until component is destroyed */ - switch_channel_set_variable(switch_core_session_get_channel(session), "rayo_read_frame_interrupt", RAYO_JID(component)); + switch_core_session_execute_application_async(session, "stopfax", ""); switch_core_session_rwunlock(session); } - FAX_COMPONENT(component)->stop = 1; return iks_new_iq_result(iq); }