pidgin.vv: c51d00cc: Use the stream's direction to wait to se...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sat Jan 17 05:11:04 EST 2009


-----------------------------------------------------------------
Revision: c51d00ccf502cd9986616406747f9b0144c4e6c3
Ancestor: eff997b9e44a0c5c1e63980780ba7d91f430ed2f
Author: maiku at soc.pidgin.im
Date: 2009-01-17T04:18:23
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/c51d00ccf502cd9986616406747f9b0144c4e6c3

Modified files:
        libpurple/media.c

ChangeLog: 

Use the stream's direction to wait to send media.

-------------- next part --------------
============================================================
--- libpurple/media.c	2366c6e026c659d05589494165851ebb8d9236f3
+++ libpurple/media.c	311983289ccea44fdc1af3cc90ccf385cd07cc85
@@ -1234,7 +1234,11 @@ purple_media_accept(PurpleMedia *media)
 	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 @@ purple_media_add_stream_internal(PurpleM
 			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) {


More information about the Commits mailing list