Revision
15152
Author
anthm
Date
2009-10-13 15:35:13 -0500 (Tue, 13 Oct 2009)

Log Message

working on 2 boxes at once ignore me

Modified Paths

Diff

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


--- freeswitch/trunk/src/switch_ivr_bridge.c	2009-10-13 20:34:48 UTC (rev 15151)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	2009-10-13 20:35:13 UTC (rev 15152)
@@ -81,7 +81,7 @@
 
 static void send_display(switch_core_session_t *session, switch_core_session_t *peer_session) {
 
-	switch_core_session_message_t msg = { 0 };
+	switch_core_session_message_t *msg;
 	switch_caller_profile_t *caller_profile;
 	switch_channel_t *caller_channel;
 	const char *name, *number;
@@ -111,14 +111,14 @@
 		}
 	}
 
+	msg = switch_core_session_alloc(peer_session, sizeof(*msg));
+	MESSAGE_STAMP_FFL(msg);
+	msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
+	msg->string_array_arg[0] = switch_core_session_strdup(peer_session, name);
+	msg->string_array_arg[1] = switch_core_session_strdup(peer_session, number);
+	msg->from = __FILE__;
+	switch_core_session_queue_message(peer_session, msg);
 
-	msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
-	msg.string_array_arg[0] = name;
-	msg.string_array_arg[1] = number;
-	msg.from = __FILE__;
-	
-	switch_core_session_receive_message(peer_session, &msg);
-
 }
 
 
@@ -164,6 +164,7 @@
 	int answer_timeout, sent_update = -50;
 	time_t answer_limit = 0;
 	
+
 #ifdef SWITCH_VIDEO_IN_THREADS
 	struct vid_helper vh = { 0 };
 	uint32_t vid_launch = 0;
@@ -216,10 +217,10 @@
 		switch_channel_set_variable(chan_a, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, NULL);
 	}
 
-	if ((silence_var = switch_channel_get_variable(chan_a, "bridge_generate_comfort_noise"))) {
+	if ((silence_var = switch_channel_get_variable(chan_a, "bridge_generate_comfort_noise"))) {		
 		switch_codec_implementation_t read_impl = {0};
 		switch_core_session_get_read_impl(session_a, &read_impl);
-		
+
 		if (!switch_channel_media_ready(chan_a)) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Channel has no media!\n");
 			goto end_of_bridge_loop;