Revision
15153
Author
anthm
Date
2009-10-13 15:59:50 -0500 (Tue, 13 Oct 2009)

Log Message

stop the madness (maybe)

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15152 => 15153)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-13 20:35:13 UTC (rev 15152)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-13 20:59:50 UTC (rev 15153)
@@ -399,10 +399,10 @@
 	if (switch_strlen_zero(number)) {
 		number = caller_profile->destination_number;
 	}
-	
+
 	if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
 		switch_core_session_message_t *msg;
-		
+
 		msg = switch_core_session_alloc(session_b, sizeof(*msg));
 		MESSAGE_STAMP_FFL(msg);
 		msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
@@ -427,7 +427,7 @@
 	if (sip->sip_to) {
 		number = sip->sip_to->a_url->url_user;
 	}
-
+	
 	if ((passerted = sip_p_asserted_identity(sip))) {
 		if (passerted->paid_url && passerted->paid_url->url_user) {
 			number = passerted->paid_url->url_user;

Modified: freeswitch/trunk/src/switch_ivr_bridge.c (15152 => 15153)


--- freeswitch/trunk/src/switch_ivr_bridge.c	2009-10-13 20:35:13 UTC (rev 15152)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	2009-10-13 20:59:50 UTC (rev 15153)
@@ -146,7 +146,7 @@
 	switch_ivr_bridge_data_t *data = obj;
 	int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
 	switch_input_callback_function_t input_callback;
-	switch_core_session_message_t *message, msg = { 0 };
+	switch_core_session_message_t msg = { 0 };
 	void *user_data;
 	switch_channel_t *chan_a, *chan_b;
 	switch_frame_t *read_frame;
@@ -356,11 +356,6 @@
 
 		}
 
-		if (switch_core_session_dequeue_message(session_b, &message) == SWITCH_STATUS_SUCCESS) {
-			switch_core_session_receive_message(session_a, message);
-			message = NULL;
-		}
-
 		if (!ans_a && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer timeout hit on %s.\n", switch_channel_get_name(chan_a));
 			switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);

Modified: freeswitch/trunk/src/switch_ivr_originate.c (15152 => 15153)


--- freeswitch/trunk/src/switch_ivr_originate.c	2009-10-13 20:35:13 UTC (rev 15152)
+++ freeswitch/trunk/src/switch_ivr_originate.c	2009-10-13 20:59:50 UTC (rev 15153)
@@ -1014,7 +1014,6 @@
 	char *e = NULL;
 	const char *ringback_data = NULL;
 	switch_codec_t *read_codec = NULL;
-	switch_core_session_message_t *message = NULL;
 	switch_event_t *var_event = NULL;
 	uint8_t fail_on_single_reject = 0;
 	char *fail_on_single_reject_var = NULL;
@@ -1026,7 +1025,6 @@
 	int local_clobber = 0;
 	const char *cancel_key = NULL;
 	const char *holding = NULL;
-	switch_channel_state_t wait_state = 0;
 
 	if (session) {
 		const char *to_var;
@@ -1968,10 +1966,6 @@
 			}
 #endif
 
-			if (caller_channel) {
-				wait_state = switch_channel_get_state(caller_channel);
-			}
-			
 			while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) && 
 				   check_channel_status(&oglobals, originate_status, and_argc)) {
 				time_t elapsed = switch_epoch_time_now(NULL) - start;
@@ -1987,11 +1981,6 @@
 					switch_ivr_parse_all_events(oglobals.session);
 				}
 
-				if (caller_channel && switch_channel_get_state(caller_channel) != wait_state && !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
-					//oglobals.idx = IDX_NADA;
-                    //goto notready;
-				}
-
 				if (!oglobals.sent_ring && !oglobals.progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
 					oglobals.idx = IDX_TIMEOUT;
 					goto notready;
@@ -2025,12 +2014,7 @@
 						goto notready;
 					}
 				}
-
-				if (oglobals.session && switch_core_session_dequeue_message(oglobals.session, &message) == SWITCH_STATUS_SUCCESS) {
-					switch_core_session_receive_message(oglobals.session, message);
-					message = NULL;
-				}
-
+				
 				/* read from the channel while we wait if the audio is up on it */
 				if (oglobals.session &&
 					!switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&