]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add all modifier to break
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 Jan 2009 21:52:20 +0000 (21:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 29 Jan 2009 21:52:20 +0000 (21:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11557 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_dptools/mod_dptools.c

index d7176b2465a3e81b10b6f325ea195412a4b0a802..cf1bd5a7053508b5b88f6e22cd210e639b98491b 100644 (file)
@@ -1954,11 +1954,7 @@ SWITCH_STANDARD_API(break_function)
        }
 
        channel = switch_core_session_get_channel(psession);
-       if (switch_channel_test_flag(channel, CF_BROADCAST)) {
-               switch_channel_stop_broadcast(channel);
-       } else {
-               switch_channel_set_flag(channel, CF_BREAK);
-       }
+
        switch_core_session_rwunlock(psession);
 
        return SWITCH_STATUS_SUCCESS;
index 25e511d3f73ada9a829075b41e451ee6af25e9cf..2a71681a71b3d1989234f20659d887bab84be440 100644 (file)
@@ -385,7 +385,19 @@ SWITCH_STANDARD_APP(remove_bugs_function)
 
 SWITCH_STANDARD_APP(break_function)
 {
-       switch_channel_set_flag(switch_core_session_get_channel(session), CF_BREAK);
+       switch_channel_t *channel;
+
+       channel = switch_core_session_get_channel(session);
+
+       if (data && strcasecmp(data, "all")) {
+               switch_core_session_flush_private_events(session);
+       }
+
+       if (switch_channel_test_flag(channel, CF_BROADCAST)) {
+               switch_channel_stop_broadcast(channel);
+       } else {
+               switch_channel_set_flag(channel, CF_BREAK);
+       }
 }
 
 SWITCH_STANDARD_APP(queue_dtmf_function)