[Bug 59126] New: Channels should be able to tell features that needs to be prepared on its connection

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 8 12:06:36 CET 2013


https://bugs.freedesktop.org/show_bug.cgi?id=59126

          Priority: medium
            Bug ID: 59126
          Assignee: telepathy-bugs at lists.freedesktop.org
           Summary: Channels should be able to tell features that needs to
                    be prepared on its connection
        QA Contact: telepathy-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: xclaesse at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: tp-glib
           Product: Telepathy

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list