Bug 22889

Summary: Calls GetAll on channels even if constructed with properties
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-glib.git;a=shortlog;h=refs/heads/properties-introspection
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2009-07-22 06:12:41 UTC
Due to erroneously looking up a pair of unqualified property names rather than the qualified names, tp_channel_new_from_properties() does not avoid a call to GetAll("...Telepathy.Channel"). My branch 'properties-introspection' fixes this, and adds a regression test.
Comment 1 Will Thompson 2009-07-27 05:12:46 UTC
The branch 'group-introspection-roundtrip-reduction' <http://git.collabora.co.uk/?p=user/wjt/telepathy-glib.git;a=shortlog;h=refs/heads/group-introspection-roundtrip-reduction> extends 'properties-introspection' by improving the fast-path in the presence of the Group interface. Currently, TpChannel calls GetInterfaces() redundantly to check the channel's alive even if the Group properties are about to be introspected, which could just as well serve as a check that the channel's alive.
Comment 2 Simon McVittie 2009-07-27 05:25:18 UTC
13:17 < smcv> wjt:    TestTextChannelNull *service_props_chan;
13:17 < smcv> wjt: +  TestPropsTextChannel *service_props_chan_;
13:17 < smcv> wjt: no. variable names with meaning, please
13:17 < smcv> wjt: you could probably just change the type of 
              service_props_chan to be the subclass, then cast it where needed?

(There is another instance of this for the group channel.)

Apart from that, I think this is ready for merge.
Comment 3 Will Thompson 2009-07-27 06:01:52 UTC
Merged, will be in 0.7.34. Thanks for the review!

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.