[Bug 38142] proxy factories

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 25 18:04:02 CEST 2011


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

--- Comment #64 from Will Thompson <will.thompson at collabora.co.uk> 2011-07-25 09:04:01 PDT ---
-      channel = tp_client_channel_factory_create_channel (
-          self->priv->channel_factory, connection, chan_path, chan_props,
-          &error);
+      if (self->priv->channel_factory != NULL)
+        channel = tp_client_channel_factory_create_channel (
+            self->priv->channel_factory, connection, chan_path, chan_props,
+            &error);
+      else
+        channel = tp_simple_client_factory_ensure_channel (
+            tp_proxy_get_factory (self->priv->account_mgr), connection,
+            chan_path, chan_props, &error);

This, and the equivalent for dupping features, is repeatedly duplicated.

Is tp_proxy_get_factory() guaranteed to return non-NULL if
self->priv->channel_factory == NULL? Why?


-  g_return_if_fail (TP_IS_CLIENT_CHANNEL_FACTORY (factory));

   tp_clear_object (&self->priv->channel_factory);

-  self->priv->channel_factory = g_object_ref (factory);
+  if (factory != NULL)
+    self->priv->channel_factory = g_object_ref (factory);

You should probably not remove the type check.

-- 
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