mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-22 20:04:52 +00:00
skypiax: timing on closing audio, mutexing TFLAG_BREAK
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16538 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
7cc61fd8e5
commit
769d794f48
@ -599,7 +599,7 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
|
|||||||
switch (sig) {
|
switch (sig) {
|
||||||
case SWITCH_SIG_KILL:
|
case SWITCH_SIG_KILL:
|
||||||
DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
|
DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
|
||||||
//switch_mutex_lock(tech_pvt->flag_mutex);
|
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||||
switch_clear_flag(tech_pvt, TFLAG_IO);
|
switch_clear_flag(tech_pvt, TFLAG_IO);
|
||||||
switch_clear_flag(tech_pvt, TFLAG_VOICE);
|
switch_clear_flag(tech_pvt, TFLAG_VOICE);
|
||||||
switch_set_flag(tech_pvt, TFLAG_HANGUP);
|
switch_set_flag(tech_pvt, TFLAG_HANGUP);
|
||||||
@ -615,14 +615,14 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
|
|||||||
ERRORA("FYI %s CHANNEL in %d state got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel), switch_channel_get_state(channel));
|
ERRORA("FYI %s CHANNEL in %d state got SWITCH_SIG_KILL\n", SKYPIAX_P_LOG, switch_channel_get_name(channel), switch_channel_get_state(channel));
|
||||||
channel_on_hangup(session);
|
channel_on_hangup(session);
|
||||||
}
|
}
|
||||||
//switch_mutex_unlock(tech_pvt->flag_mutex);
|
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||||
break;
|
break;
|
||||||
case SWITCH_SIG_BREAK:
|
case SWITCH_SIG_BREAK:
|
||||||
DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_BREAK\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
|
DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_BREAK\n", SKYPIAX_P_LOG, switch_channel_get_name(channel));
|
||||||
//switch_set_flag(tech_pvt, TFLAG_BREAK);
|
//switch_set_flag(tech_pvt, TFLAG_BREAK);
|
||||||
//switch_mutex_lock(tech_pvt->flag_mutex);
|
switch_mutex_lock(tech_pvt->flag_mutex);
|
||||||
switch_set_flag(tech_pvt, TFLAG_BREAK);
|
switch_set_flag(tech_pvt, TFLAG_BREAK);
|
||||||
//switch_mutex_unlock(tech_pvt->flag_mutex);
|
switch_mutex_unlock(tech_pvt->flag_mutex);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -909,14 +909,14 @@ void *skypiax_do_tcp_srv_thread_func(void *obj)
|
|||||||
len = skypiax_pipe_write(tech_pvt->audiopipe_cli[1], kill_cli_buff, kill_cli_size);
|
len = skypiax_pipe_write(tech_pvt->audiopipe_cli[1], kill_cli_buff, kill_cli_size);
|
||||||
|
|
||||||
tech_pvt->flag_audio_cli = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
tech_pvt->flag_audio_cli = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
||||||
skypiax_sleep(200);
|
skypiax_sleep(2000);
|
||||||
tech_pvt->flag_audio_srv = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
tech_pvt->flag_audio_srv = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
||||||
skypiax_sleep(200);
|
skypiax_sleep(2000);
|
||||||
tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
|
tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
|
||||||
tech_pvt->flag_audio_cli = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
tech_pvt->flag_audio_cli = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
||||||
skypiax_sleep(200);
|
skypiax_sleep(2000);
|
||||||
tech_pvt->flag_audio_srv = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
tech_pvt->flag_audio_srv = 1; //let's send some frame in the pipes, so both tcp_cli and tcp_srv will have an occasion to die
|
||||||
skypiax_sleep(200);
|
skypiax_sleep(2000);
|
||||||
DEBUGA_SKYPE("Skype incoming audio GONE\n", SKYPIAX_P_LOG);
|
DEBUGA_SKYPE("Skype incoming audio GONE\n", SKYPIAX_P_LOG);
|
||||||
skypiax_close_socket(fd);
|
skypiax_close_socket(fd);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user