[Freeswitch-svn] [commit] r7011 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Fri Dec 28 19:10:07 EST 2007
Author: anthm
Date: Fri Dec 28 19:10:07 2007
New Revision: 7011
Modified:
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_core_session.c
Log:
tweak
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Fri Dec 28 19:10:07 2007
@@ -1223,10 +1223,13 @@
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",
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Fri Dec 28 19:10:07 2007
@@ -84,9 +84,12 @@
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);
More information about the Freeswitch-svn
mailing list