Bug 96792 - call-stream: fix endpoint and jingle transport states mapping
Summary: call-stream: fix endpoint and jingle transport states mapping
Status: NEW
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-03 19:43 UTC by Fabrice Bellet
Modified: 2016-07-03 19:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
call-stream: fix endpoint and jingle transport states mapping (1.67 KB, patch)
2016-07-03 19:43 UTC, Fabrice Bellet
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fabrice Bellet 2016-07-03 19:43:46 UTC
Created attachment 124875 [details] [review]
call-stream: fix endpoint and jingle transport states mapping

The function _endpoint_state_changed_cb() passes an enum TpStreamEndpointState between tp_call_stream_endpoint_get_state() and wocky_jingle_content_set_transport_state() without conversion, this last function expecting an enum WockyJingleTransportState, which is not completely equivalent.

typedef enum
{
    TP_STREAM_ENDPOINT_STATE_CONNECTING = 0,
    TP_STREAM_ENDPOINT_STATE_PROVISIONALLY_CONNECTED = 1,
    TP_STREAM_ENDPOINT_STATE_FULLY_CONNECTED = 2,
    TP_STREAM_ENDPOINT_STATE_EXHAUSTED_CANDIDATES = 3,
    TP_STREAM_ENDPOINT_STATE_FAILED = 4,
} TpStreamEndpointState;

typedef enum
{
  WOCKY_JINGLE_TRANSPORT_STATE_DISCONNECTED,
  WOCKY_JINGLE_TRANSPORT_STATE_CONNECTING,
  WOCKY_JINGLE_TRANSPORT_STATE_CONNECTED
} WockyJingleTransportState;


The visible consequence is that jingle considers that the connection is established (and the media stream can start flowing) when the endpoint state is /fully/ connected (value 3 for both enums), instead of /provisionally/ connected only. This may have a significant impact when the state provisionally connected is reached very early, and  the state fully connected takes much more time.


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.