Bug 29609

Summary: Client D-Bus method implementations should stop always creating new Account and Connection objects
Product: Telepathy Reporter: Olli Salli <ollisal>
Component: tp-qtAssignee: Olli Salli <ollisal>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: high    
Version: git master   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 29606    
Bug Blocks: 29451    

Description Olli Salli 2010-08-17 03:50:39 UTC
Current Tp-Qt4 Client channel handling is done via the Client{Observer,Handler,Approver}Adaptor classes in ClientRegistrar internals, calling to the application AbstractClient* subclass virtual handling method implementation. Before calling that, though, the Adaptor D-Bus method implementations create Account, Connection and Channel objects corresponding to the object paths indicated by the method parameters. The objects are always created anew, even if there is an existing Account / Connection proxy for the same D-Bus object.

In addition to causing needless re-introspection, this leads to the Contact objects and handles from the Connection supplied to the application handler method implementation not working with the application's existing Connection (which is probably where the application has retrieved any current contact list contacts, etc.).

Tp-Glib always does ensure_account on a bus-connection-wide pseudo-singleton to get existing Account objects, if available. The meta bug #29451 contains relevant discussion on semantics, including whether we should do the same in tp-qt4.
Comment 1 Simon McVittie 2010-08-17 08:04:28 UTC
Bug #29614 improves the situation in telepathy-glib further.
Comment 2 Olli Salli 2010-08-30 07:52:34 UTC
Requires machinery from the fix to bug #29606
Comment 3 Olli Salli 2010-09-15 17:39:03 UTC
Fixed in git master. Will be in 0.3.10.

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.