telepathy-mission-control: McdConnection: don't bother refcounting handles, they're immortal

Simon McVittie smcv at kemper.freedesktop.org
Mon May 14 07:29:53 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: 48747e5c606d8b641ecff7eb77da163c9730e13e
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=48747e5c606d8b641ecff7eb77da163c9730e13e

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu May 10 16:06:27 2012 +0100

McdConnection: don't bother refcounting handles, they're immortal

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49753

---

 src/mcd-connection.c |   24 ------------------------
 1 files changed, 0 insertions(+), 24 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 0d38e45..7edca5d 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -2692,30 +2692,6 @@ _mcd_connection_presence_info_is_ready (McdConnection *self)
 
 static void clear_emergency_handles (McdConnectionPrivate *priv)
 {
-  guint n_handles = 0;
-
-  if (priv->emergency.handles != NULL)
-    n_handles = tp_intset_size (priv->emergency.handles);
-
-  /* trawl through the handles and unref them */
-  if (n_handles > 0)
-    {
-      TpIntsetFastIter iter;
-      TpHandle *handles = g_new0 (TpHandle, n_handles);
-      TpHandle handle;
-      guint i = 0;
-
-      tp_intset_fast_iter_init (&iter, priv->emergency.handles);
-
-      while (tp_intset_fast_iter_next (&iter, &handle))
-        handles[i++] = handle;
-
-      tp_connection_unref_handles (priv->tp_conn, TP_HANDLE_TYPE_CONTACT,
-          n_handles, handles);
-
-      g_free (handles);
-    }
-
   tp_clear_pointer (&priv->emergency.handles, tp_intset_destroy);
 }
 



More information about the telepathy-commits mailing list