]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
allow uuid_break to interrupt one or all in a delimited string of files the same...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 4 Jun 2010 15:15:04 +0000 (10:15 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 4 Jun 2010 15:15:04 +0000 (10:15 -0500)
src/mod/applications/mod_commands/mod_commands.c
src/switch_ivr_play_say.c

index e2accf365225c79e993c1146509883e823a72b87..652f6d5e06bb30ba4da493082c2949158ef7e2ba 100644 (file)
@@ -2729,14 +2729,14 @@ SWITCH_STANDARD_API(break_function)
        if (switch_channel_test_flag(channel, CF_BROADCAST)) {
                switch_channel_stop_broadcast(channel);
        } else {
-               switch_channel_set_flag(channel, CF_BREAK);
+               switch_channel_set_flag_value(channel, CF_BREAK, all ? 2 : 1);
        }
 
        if (qchannel) {
                if (switch_channel_test_flag(qchannel, CF_BROADCAST)) {
                        switch_channel_stop_broadcast(qchannel);
                } else {
-                       switch_channel_set_flag(qchannel, CF_BREAK);
+                       switch_channel_set_flag_value(qchannel, CF_BREAK, all ? 2 : 1);
                }
        }
 
index 841cec94c482961dfa90f80c1d2ac8170c4ca036..3f19b9b96e9c3d49634a16600da1c25a5ca7ebee 100644 (file)
@@ -1195,14 +1195,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
                for (;;) {
                        int do_speed = 1;
                        int last_speed = -1;
-
+                       int f;
+                       
                        if (!switch_channel_ready(channel)) {
                                status = SWITCH_STATUS_FALSE;
                                break;
                        }
 
-                       if (switch_channel_test_flag(channel, CF_BREAK)) {
+                       if ((f = switch_channel_test_flag(channel, CF_BREAK))) {
                                switch_channel_clear_flag(channel, CF_BREAK);
+                               if (f == 2) {
+                                       done = 1;
+                               }
                                status = SWITCH_STATUS_BREAK;
                                break;
                        }