]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 29 Dec 2007 00:10:07 +0000 (00:10 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 29 Dec 2007 00:10:07 +0000 (00:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7011 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_channel.c
src/switch_core_session.c

index f0bd8b7e78e6282f329817888ca8dc84b88b3057..9bb53708d8f9bf2b660069f5780ba00a1fb43383 100644 (file)
@@ -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",
index d92c14075fc0fe18dcbc0903c55dd0f35d1e50cb..cefe71af0023c48bf4025014b01f5fcca9931284 100644 (file)
@@ -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);