[Freeswitch-svn] [commit] r9645 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Thu Sep 25 10:26:00 EDT 2008


Author: anthm
Date: Thu Sep 25 10:25:59 2008
New Revision: 9645

Modified:
   freeswitch/trunk/src/switch_core_state_machine.c
   freeswitch/trunk/src/switch_ivr_bridge.c

Log:
increment app before execute in case it returns to execute it will go to the next item in the list and not the same

Modified: freeswitch/trunk/src/switch_core_state_machine.c
==============================================================================
--- freeswitch/trunk/src/switch_core_state_machine.c	(original)
+++ freeswitch/trunk/src/switch_core_state_machine.c	Thu Sep 25 10:25:59 2008
@@ -137,20 +137,23 @@
 	}
 
 	while (switch_channel_get_state(session->channel) == CS_EXECUTE && extension->current_application) {
+		switch_caller_application_t *current_application = extension->current_application;
+
+		extension->current_application = extension->current_application->next;
+
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Execute %s(%s)\n", switch_channel_get_name(session->channel),
-						  extension->current_application->application_name, switch_str_nil(extension->current_application->application_data));
+						  current_application->application_name, switch_str_nil(current_application->application_data));
 
 		if (switch_core_session_execute_application(session,
-													extension->current_application->application_name,
-													extension->current_application->application_data) != SWITCH_STATUS_SUCCESS) {
+													current_application->application_name,
+													current_application->application_data) != SWITCH_STATUS_SUCCESS) {
 			return;
 		}
 
 		if (switch_channel_test_flag(session->channel, CF_RESET)) {
 			goto top;
 		}
-
-		extension->current_application = extension->current_application->next;
+		
 	}
 
 	if (switch_channel_get_state(session->channel) == CS_EXECUTE) {

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Thu Sep 25 10:25:59 2008
@@ -136,7 +136,9 @@
 	switch_channel_wait_for_flag(chan_b, CF_BRIDGED, SWITCH_TRUE, 10000, chan_a);
 
 	if (!switch_channel_test_flag(chan_b, CF_BRIDGED)) {
-		switch_channel_hangup(chan_b, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+		if (!(switch_channel_test_flag(chan_b, CF_TRANSFER) || switch_channel_get_state(chan_b) == CS_RESET)) {
+			switch_channel_hangup(chan_b, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+		}
 		goto end_of_bridge_loop;
 	}
 



More information about the Freeswitch-svn mailing list