changeset 26051:b68a88fb7458

Use the stream's direction to wait to send media.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 17 Jan 2009 04:18:23 +0000
parents ae3d25465d0f
children 997bbae7b80f
files libpurple/media.c
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Sat Jan 17 01:38:44 2009 +0000
+++ b/libpurple/media.c	Sat Jan 17 04:18:23 2009 +0000
@@ -1234,7 +1234,11 @@
 	streams = media->priv->streams;
 
 	for (; streams; streams = g_list_next(streams)) {
-		purple_media_set_remote_candidates(streams->data);
+		PurpleMediaStream *stream = streams->data;
+		purple_media_set_remote_candidates(stream);
+		g_object_set(G_OBJECT(stream->stream), "direction",
+				purple_media_to_fs_stream_direction(
+				stream->session->type), NULL);
 	}
 }
 
@@ -1649,13 +1653,15 @@
 			g_value_set_string(&param[num_params].value, stun_ip);
 
 			fsstream = fs_session_new_stream(session->session,
-					participant, type_direction,
-					transmitter, num_params+1, param, &err);
+					participant, type_direction &
+					FS_DIRECTION_RECV, transmitter,
+					num_params+1, param, &err);
 			g_free(param);
 		} else {
 			fsstream = fs_session_new_stream(session->session,
-					participant, type_direction,
-					transmitter, num_params, params, &err);
+					participant, type_direction &
+					FS_DIRECTION_RECV, transmitter,
+					num_params, params, &err);
 		}
 
 		if (err) {