[Bug 38142] proxy factories

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 17 12:44:45 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=38142

--- Comment #77 from Will Thompson <will.thompson at collabora.co.uk> 2011-08-17 03:44:43 PDT ---
+   * don't even know if they are valid. For compatiliby we can't return a ref,

compatibility.

 static void
+legacy_account_invalidated_cb (TpProxy *account,
+    guint domain,
+    gint code,
+    gchar *message,
+    gpointer user_data)
+{
+  TpAccountManager *self = user_data;
+
+  /* We only want to deal with accounts being removed here. */
+  if (domain != TP_DBUS_ERRORS || code != TP_DBUS_ERROR_OBJECT_REMOVED)
+    return;
+
+  g_hash_table_remove (self->priv->legacy_accounts,
+      tp_proxy_get_object_path (account));
+}

This is still wrong. I think this will mean that, if a legacy account becomes
invalid and then valid again, subsequent calls to
tp_account_manager_ensure_account() will return an invalidated TpAccount
object, and there's no way to stop it doing that. You do need to cope with
legacy accounts becoming invalid and take them out of the dictionary; the issue
is not crashing when TpAM disposes. Personally, I think I would make the
dispose function iterate the hash table, removing all the callbacks, and only
then destroy the hash table. (I wasn't pointing out the similar check for
non-legacy accounts to say “just put this into this callback too”. :))

> TpAccountChannelRequest: do not create a TpAccountManager for tmp handler
> 
> We can now create TpSimpleHandle with account's factory. This avoid
> introspection of other accounts if app does not need them.

TpSimpleHandle*R*.


+ * Notice the call to tp_account_manager_set_default() at the beginning of
your
+ * main() to ensure that any library/plugin using telepathy as well will share
+ * your #TpAccountManager using tp_account_manager_dup().

“The call to tp_account_manager_set_default() near the beginning of main() will
ensure that any libraries or plugins which also use Telepathy (and call
tp_account_manager_dup()) will share your #TpAccountManager.”

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list