Bug 59126 - Channels should be able to tell features that needs to be prepared on its connection
Summary: Channels should be able to tell features that needs to be prepared on its con...
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-08 11:06 UTC by Xavier Claessens
Modified: 2019-12-03 20:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Xavier Claessens 2013-01-08 11:06:36 UTC
Interesting Empathy bug: https://bugzilla.gnome.org/show_bug.cgi?id=691006

AFAIK what happens:
1) have a chat window open
2) get disconnected
3) get reconnected
4) empathy-chat prepare CORE for its TpConnection while still in CONNECTING state. So self-contact is still NULL.
5) connection is now CONNECTED, so TpConnection start re-introspection. empathy-chat re-request a text channel.
6) empathy-chat receive a text channel and start preparing it. Channel's TpConnection is still in the re-introspecting state, so CORE is ready but not CONNECTED, and self-contact is still NULL.
7) while preparing EmpathyTpChat (the TpTextChannel subclass) it assume that its TpConnection already knows its self-contact, and then crash because it's not yet true.

TpChannel already has code that first prepare CORE on TpConnection before doing anything else, but in this scenario CORE is prepared but it does not mean the connection is CONNECTED already. We cannot make TpChannel always depend on CONNECTED feature on its TpConnection because of SASL channels.

So I suggest having a way for TpChannel subclasses to tell which features it depends on for its TpConnection. What about:

GArray *TpChannelClass::dup_required_connection_features(TpChannel *self);

TpChannel's default implementation would return a new array with only CORE, but subclasses could override, first chainup to parent, then add what they want it the array.
Comment 1 GitLab Migration User 2019-12-03 20:41:10 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-glib/issues/107.


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.