forked from Mirrors/freeswitch
tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7011 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d02dae9664
commit
76b2de5836
@ -1223,10 +1223,13 @@ SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_chan
|
||||
switch_mutex_unlock(channel->profile_mutex);
|
||||
}
|
||||
|
||||
switch_set_flag(channel, CF_BREAK);
|
||||
switch_clear_flag(channel, CF_BROADCAST);
|
||||
|
||||
if (channel->state < CS_HANGUP) {
|
||||
switch_event_t *event;
|
||||
switch_channel_state_t last_state = channel->state;
|
||||
|
||||
|
||||
channel->state = CS_HANGUP;
|
||||
channel->hangup_cause = hangup_cause;
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Hangup %s [%s] [%s]\n",
|
||||
|
@ -84,9 +84,12 @@ SWITCH_DECLARE(void) switch_core_session_hupall(switch_call_cause_t cause)
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
if (val) {
|
||||
session = (switch_core_session_t *) val;
|
||||
switch_core_session_read_lock(session);
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_channel_hangup(channel, cause);
|
||||
switch_core_session_kill_channel(session, SWITCH_SIG_KILL);
|
||||
|
||||
switch_core_session_rwunlock(session);
|
||||
}
|
||||
}
|
||||
switch_mutex_unlock(runtime.throttle_mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user