diff options
author | Michael Ruprecht <maiku@pidgin.im> | 2009-11-11 02:38:28 +0000 |
---|---|---|
committer | Michael Ruprecht <maiku@pidgin.im> | 2009-11-11 02:38:28 +0000 |
commit | 3d26e9e3b035f08febb413a9c3b08a0dfe770230 (patch) | |
tree | 5f88369d0bb1aee1904bd61f670420b66f333d71 | |
parent | 238c757020374e509c7c0d78c9d170720d62e31f (diff) | |
download | pidgin-3d26e9e3b035f08febb413a9c3b08a0dfe770230.tar.gz |
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.
-rw-r--r-- | libpurple/media.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libpurple/media.c b/libpurple/media.c index 1b890e8e77..3f266ddc2c 100644 --- a/libpurple/media.c +++ b/libpurple/media.c @@ -2281,7 +2281,8 @@ purple_media_stream_info(PurpleMedia *media, PurpleMediaInfoType type, 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 @@ purple_media_add_stream(PurpleMedia *media, const gchar *sess_id, } 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 @@ purple_media_add_remote_candidates(PurpleMedia *media, const gchar *sess_id, 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); |