# HG changeset patch # User maiku@pidgin.im # Date 1257917498 0 # Node ID 9da83d5f48c3fb2e5d7b340bb5600bfe479faa8a # Parent e4884dbf0c0249f7bba5f520a0fa483293b16173 Allow connection checks before acceptance. Fixes Empathy<->Pidgin. diff -r e4884dbf0c02 -r 9da83d5f48c3 libpurple/media/backend-fs2.c --- a/libpurple/media/backend-fs2.c Wed Nov 11 03:07:21 2009 +0000 +++ b/libpurple/media/backend-fs2.c Wed Nov 11 05:31:38 2009 +0000 @@ -1088,7 +1088,8 @@ 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 @@ } 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 @@ 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);