# HG changeset patch # User maiku@pidgin.im # Date 1257907108 0 # Node ID 867438a30bdd9769586b011f733fc789713f1ce3 # Parent aa8fa6335c9ca08b65bd3ef8d58c6a94d84f2b37 Allow the initiator to start connection checks before the remote side accepts. Clients are allowed send candidates before acceptance. Empathy doesn't accept until the connection checks are successful. Fixes Pidgin <-> Empathy calls. diff -r aa8fa6335c9c -r 867438a30bdd libpurple/media.c --- a/libpurple/media.c Wed Nov 11 02:06:19 2009 +0000 +++ b/libpurple/media.c Wed Nov 11 02:38:28 2009 +0000 @@ -2281,7 +2281,8 @@ stream->session->type), NULL); stream->accepted = TRUE; - if (stream->remote_candidates != NULL) { + if (stream->remote_candidates != NULL && + stream->initiator == FALSE) { GError *err = NULL; fs_stream_set_remote_candidates(stream->stream, stream->remote_candidates, &err); @@ -2816,14 +2817,16 @@ } fsstream = fs_session_new_stream(session->session, - participant, type_direction & - FS_DIRECTION_RECV, transmitter, + participant, initiator == TRUE ? + type_direction : (type_direction & + FS_DIRECTION_RECV), transmitter, new_num_params, param, &err); g_free(param); } else { fsstream = fs_session_new_stream(session->session, - participant, type_direction & - FS_DIRECTION_RECV, transmitter, + participant, initiator == TRUE ? + type_direction : (type_direction & + FS_DIRECTION_RECV), transmitter, num_params, params, &err); } @@ -2952,7 +2955,7 @@ stream->remote_candidates = g_list_concat(stream->remote_candidates, purple_media_candidate_list_to_fs(remote_candidates)); - if (stream->accepted == TRUE) { + if (stream->initiator == TRUE || stream->accepted == TRUE) { fs_stream_set_remote_candidates(stream->stream, stream->remote_candidates, &err);