Bug 29609 - Client D-Bus method implementations should stop always creating new Account and Connection objects
Summary: Client D-Bus method implementations should stop always creating new Account a...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: git master
Hardware: All All
: high enhancement
Assignee: Olli Salli
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on: 29606
Blocks: 29451
  Show dependency treegraph
 
Reported: 2010-08-17 03:50 UTC by Olli Salli
Modified: 2010-09-15 17:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.