Bug 101542 - set controlling to a value reflecting who initiated the connection
Summary: set controlling to a value reflecting who initiated the connection
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-farstream (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Olivier Crête
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-21 18:05 UTC by Fabrice Bellet
Modified: 2019-12-03 19:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
call-stream: set the controlling state (1.50 KB, patch)
2017-06-29 10:44 UTC, Fabrice Bellet
Details | Splinter Review

Description Fabrice Bellet 2017-06-21 18:05:18 UTC
Hi!

In the current implementation of tp-farstream, in got_stream_media_properties(), both peers using this same code will always be created with a controlling value of zero, which is suboptimal because this will cause some unnecessary role conflict stun requests before converging to a distinct role for both peers with the nice transmitter.

Would it be possible to make a guess based for example on the stream flow status, to find which peer initiated the connection, and set controlling=true for it?

For example testing "(self->receiving_state == TP_STREAM_FLOW_STATE_PENDING_START) " ? The difficulty (or not a difficulty maybe) is that the second stream will use the nice agent created for the first stream, so only the state of the first stream is really needed to establish the controlling/controlled role of the nice agent.
Comment 1 Olivier Crête 2017-06-21 19:29:56 UTC
Yeah, the RFC says that the agent that sent the initial ICE offer should be controlling, so we know that info the the TP object.
Comment 2 Fabrice Bellet 2017-06-29 10:44:00 UTC
Created attachment 132336 [details] [review]
call-stream: set the controlling state
Comment 3 Olivier Crête 2017-06-29 13:26:37 UTC
Comment on attachment 132336 [details] [review]
call-stream: set the controlling state

Review of attachment 132336 [details] [review]:
-----------------------------------------------------------------

I guess the reason we had not done this before is to able to receive a call from a peer that only support ICE-lite (so where the roles are inverted). But I guess it's better to have this patch then have a role switch almost every time.
Comment 4 GitLab Migration User 2019-12-03 19:16:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-farstream/issues/6.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.