From 50243c805888e915b2fff26d50a84048d4e8ee52 Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Wed, 21 Jun 2017 21:04:46 +0200 Subject: [PATCH] call-stream: set the controlling state With this patch, we use the stream flow initial state to detect if the local client is the initiator of the call, and in this case, we set the controlling state. This state is used when creating the agent of the nice transmitter, and it is best to avoid having the agent of both peers with the same initial controlling state. https://bugs.freedesktop.org/show_bug.cgi?id=101542 --- telepathy-farstream/call-stream.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/telepathy-farstream/call-stream.c b/telepathy-farstream/call-stream.c index 2cf1697..0f366bf 100644 --- a/telepathy-farstream/call-stream.c +++ b/telepathy-farstream/call-stream.c @@ -1143,15 +1143,9 @@ got_stream_media_properties (TpProxy *proxy, GHashTable *out_Properties, goto invalid_property; } -/* FIXME: controlling is on the endpoint - self->controlling = tp_asv_get_boolean (out_Properties, - "Controlling", &valid); - if (!valid) - { - g_warning ("No Controlling property"); - goto invalid_property; - } -*/ + if (self->receiving_state == TP_STREAM_FLOW_STATE_PENDING_START) + self->controlling = TRUE; + self->stun_servers = g_boxed_copy (TP_ARRAY_TYPE_SOCKET_ADDRESS_IP_LIST, stun_servers); self->relay_info = g_boxed_copy (TP_ARRAY_TYPE_STRING_VARIANT_MAP_LIST, -- 2.9.4