Bug 27780 - TpAccount doesn't always notify::connection
Summary: TpAccount doesn't always notify::connection
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: 0.10
Hardware: Other All
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/sm...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-04-21 12:28 UTC by Simon McVittie
Modified: 2010-04-28 08:51 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2010-04-21 12:28:40 UTC
TpAccount doesn't automatically create a new TpConnection when the connection_object_path member changes, only when someone actually asks for it.

This has the surprising side-effect that notify::connection isn't emitted when the object path is first discovered.

This block in _tp_account_update:

>   if (g_hash_table_lookup (properties, "Connection") != NULL)

should emit notify::connection; if someone actually cares about it, they'll call tp_account_get_connection (directly or via the property getter), resulting in the creation of a TpConnection.
Comment 1 Simon McVittie 2010-04-22 07:24:38 UTC
This branch might fix this, but is, so far, untested:

http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/010-account-notify
Comment 2 Simon McVittie 2010-04-23 11:27:25 UTC
I've updated the branch to include a regression test, and a fix for an unrelated TpAccount bug (it leaks the GHashTable containing parameters). Review would be appreciated; we can hopefully get this fixed in 0.10.5 and 0.11.4.
Comment 3 Guillaume Desmottes 2010-04-26 02:20:20 UTC
Looks good.
Comment 4 Simon McVittie 2010-04-26 04:34:46 UTC
Fixed in git telepathy-glib-0.10 and master; will be in 0.10.5 and 0.11.4, respectively.


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.