pidgin.next.minor: a7065546: Allow connection checks before acceptanc...

maiku at pidgin.im maiku at pidgin.im
Wed Nov 11 00:35:41 EST 2009


-----------------------------------------------------------------
Revision: a70655460ab0929ece64f5b6a8df92846a67b162
Ancestor: bb11bd52e34444c29c8c93c05c344dd6f6059a2e
Author: maiku at pidgin.im
Date: 2009-11-11T05:31:38
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/a70655460ab0929ece64f5b6a8df92846a67b162

Modified files:
        libpurple/media/backend-fs2.c

ChangeLog: 

Allow connection checks before acceptance. Fixes Empathy<->Pidgin.

-------------- next part --------------
============================================================
--- libpurple/media/backend-fs2.c	652e25c64b1bf220ff47f4f25409532289276000
+++ libpurple/media/backend-fs2.c	6e1e918346836f315ddcbb3f45e8b0086c5301e8
@@ -1088,7 +1088,8 @@ stream_info_cb(PurpleMedia *media, Purpl
 				session_type_to_fs_stream_direction(
 				stream->session->type), NULL);
 
-		if (stream->remote_candidates == NULL)
+		if (stream->remote_candidates == NULL ||
+				purple_media_is_initiator(media, sid, name))
 			return;
 
 		fs_stream_set_remote_candidates(stream->stream,
@@ -1650,7 +1651,8 @@ create_stream(PurpleMediaBackendFs2 *sel
 	}
 
 	fsstream = fs_session_new_stream(session->session, participant,
-			type_direction & FS_DIRECTION_RECV, transmitter,
+			initiator == TRUE ? type_direction :
+			(type_direction & FS_DIRECTION_RECV), transmitter,
 			_num_params, _params, &err);
 	g_free(_params);
 
@@ -1762,7 +1764,9 @@ purple_media_backend_fs2_add_remote_cand
 	stream->remote_candidates = g_list_concat(stream->remote_candidates,
 			candidate_list_to_fs(remote_candidates));
 
-	if (purple_media_accepted(priv->media, sess_id, participant)) {
+	if (purple_media_is_initiator(priv->media, sess_id, participant) ||
+			purple_media_accepted(
+			priv->media, sess_id, participant)) {
 		fs_stream_set_remote_candidates(stream->stream,
 				stream->remote_candidates, &err);
 


More information about the Commits mailing list