Bug 32191 - tp_connection_get_contacts_by_handle doesn't always give all desired features
Summary: tp_connection_get_contacts_by_handle doesn't always give all desired features
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: 0.12
Hardware: Other All
: medium major
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-12-07 11:31 UTC by Simon McVittie
Modified: 2010-12-08 06:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-12-07 11:31:35 UTC
I encountered this while trying to add a self-contact to TpConnection.

The first fast path in tp_connection_get_contacts_by_handle, for the case where all the desired contacts already exist, tries to avoid D-Bus calls. However, it tries a bit too hard: it won't call GetContactAttributes even if the desired features include information that ought to be supplied that way, and isn't present on all of the already-existing contacts.

The code is a twisty maze of callbacks all alike, but I'm making progress...
Comment 1 Simon McVittie 2010-12-07 11:54:15 UTC
Here's a branch.

Some of this (everything except the regression test, probably) ought to be backported to 0.12 too; I haven't done that yet.

I haven't yet tested that this doesn't re-introduce Bug #25181, the fix for which caused this bug.
Comment 2 Guillaume Desmottes 2010-12-08 00:59:30 UTC
Looks good, I think. But please do check we didn't regress bug #25181 before merging.
Comment 3 Simon McVittie 2010-12-08 05:16:55 UTC
It turns out 0.12 had ContactInfo, so even the ad-hoc regression test backported easily. I've added a more systematic test, too.

You've already reviewed all the changes to telepathy-glib/ - only the changes to tests/dbus/contacts.c and tests/dbus/contacts-slow-path.c need review.

http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/contact is the merge into master, which had conflicts (resolved by re-adding the call to tp_tests_abort_after(10), which didn't exist in 0.12).
Comment 4 Guillaume Desmottes 2010-12-08 05:23:21 UTC
++
Comment 5 Simon McVittie 2010-12-08 06:34:12 UTC
Fixed in git for 0.12.6 and 0.13.9.


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.