Summary: | TpConnection should prepare features on its self contact | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Xavier Claessens <xclaesse> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | Keywords: | patch |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=self-contact | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: |
Description
Xavier Claessens
2011-09-07 04:19:22 UTC
Here is proposed fix: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=self-contact It is a bit more complex than expected because we have to make sure the self contact is fetched late in connection's introspection so it has attribute ifaces. (In reply to comment #1) > It is a bit more complex than expected because we have to make sure the self > contact is fetched late in connection's introspection so it has attribute > ifaces. Actually, you're allowed to blindly pass all the interfaces you want to GetContactAttributes() these days—but I guess tp-glib client side hasn't been updated to take advantage of that. (Or am I misunderstanding?) http://telepathy.freedesktop.org/spec/Connection_Interface_Contacts.html#Method:GetContactAttributes + /* FIXME: We should use tp_simple_client_factory_dup_contact(), but that would This function doesn't exist. (It is also mentioned in an existing comment in contact.c; perhaps you'd like to fix that at the same time.) The branch looks fine, functionally speaking: perhaps a test case would be nice? (In reply to comment #2) > (In reply to comment #1) > > It is a bit more complex than expected because we have to make sure the self > > contact is fetched late in connection's introspection so it has attribute > > ifaces. > > Actually, you're allowed to blindly pass all the interfaces you want to > GetContactAttributes() these days—but I guess tp-glib client side hasn't been > updated to take advantage of that. (Or am I misunderstanding?) That would simplify stuff I guess. But atm in contacts_bind_to_signals() it ignore features wanted that does not have known interface. Actually this make me realize a possible race with contact-list feature: if I get ContactListState going to SUCCESS before the TpConnection got its contact attribute interfaces, it won't prepare all features on roster contacts. > + /* FIXME: We should use tp_simple_client_factory_dup_contact(), but that > would > > This function doesn't exist. (It is also mentioned in an existing comment in > contact.c; perhaps you'd like to fix that at the same time.) fixed > The branch looks fine, functionally speaking: perhaps a test case would be > nice? added Branch updated (In reply to comment #3) > That would simplify stuff I guess. But atm in contacts_bind_to_signals() it > ignore features wanted that does not have known interface. Yeah, I don't think it needs changing before merging this branch. > Actually this make me realize a possible race with contact-list feature: if I > get ContactListState going to SUCCESS before the TpConnection got its contact > attribute interfaces, it won't prepare all features on roster contacts. This isn't a new issue introduced by this branch, right? Have you filed a bug for this? thanks, merged. (In reply to comment #4) > (In reply to comment #3) > > Actually this make me realize a possible race with contact-list feature: if I > > get ContactListState going to SUCCESS before the TpConnection got its contact > > attribute interfaces, it won't prepare all features on roster contacts. > > This isn't a new issue introduced by this branch, right? Have you filed a bug > for this? That's not new, reported to bug #40797 |
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.