From bug #27874: Another thing to consider, which I missed during TpBaseClient code review (sorry): uniqueness guarantees. At the moment, you always make a new TpAccount and TpConnection in _tp_base_client_observe_channels, and presumably in the Approver. I think it should be more like this: * each TpBaseClient has a reference to a TpAccountManager * if the TpBaseClient's dbus_daemon is the same as returned by tp_dbus_daemon_dup(), then the account manager is guaranteed to be the one from tp_account_manager_dup(); otherwise, it's given by tp_account_manager_new() * the TpAccount in ObserveChannels is made using tp_account_manager_ensure_account() on the AM * the TpConnection is made using tp_account_ensure_connection() on the Account * the channels are attached to that TpConnection This means that any TpContacts will all come from the same TpConnection, which is a considerable win.
http://git.collabora.co.uk/?p=user/cassidy/telepathy-glib;a=shortlog;h=refs/heads/recycle-27982
Looks OK, but this: > + dbus = tp_dbus_daemon_dup (NULL); > + if (self->priv->dbus == dbus) will attempt to connect to the session/starter bus. Could you add an internal method that this could use instead? Something like: gboolean _tp_dbus_daemon_is_the_shared_one (TpDBusDaemon *self) { return (self != NULL && self == starter_bus_daemon); }
done.
Thanks, looks good.
Merged to master.
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.