[Freeswitch-svn] [commit] r10545 - freeswitch/trunk/src/mod/applications/mod_commands

FreeSWITCH SVN anthm at freeswitch.org
Wed Nov 26 11:48:36 PST 2008


Author: anthm
Date: Wed Nov 26 14:48:36 2008
New Revision: 10545

Log:
make break all stop broadcast too

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Wed Nov 26 14:48:36 2008
@@ -1766,7 +1766,8 @@
 {
 	switch_core_session_t *psession = NULL;
 	char *mycmd, *flag;
-	
+	switch_channel_t *channel = NULL;
+
 	if (session) {
 		return SWITCH_STATUS_FALSE;
 	}
@@ -1792,7 +1793,12 @@
 		switch_core_session_flush_private_events(psession);
 	}
 
-	switch_channel_set_flag(switch_core_session_get_channel(psession), CF_BREAK);
+	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;



More information about the Freeswitch-svn mailing list