[Telepathy-commits] [telepathy-gabble/master] Remove two unnecessary refs to the self-handle per MUC channel

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Aug 19 10:52:59 PDT 2008


Note that this will probably assert if the group mixin does not ref the
self-handle itself (this functionality was added after 0.7.8).

20080526150231-53eee-8e09e7afa4c78353cd71cc4d2c946211fbc06007.gz
---
 src/gabble-muc-channel.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gabble-muc-channel.c b/src/gabble-muc-channel.c
index ff63f94..4b74827 100644
--- a/src/gabble-muc-channel.c
+++ b/src/gabble-muc-channel.c
@@ -273,8 +273,8 @@ gabble_muc_channel_constructor (GType type, guint n_props,
   /* get our own identity in the room */
   contact_handle_to_room_identity (GABBLE_MUC_CHANNEL (obj),
       conn->self_handle, &self_handle, &priv->self_jid);
-
-  tp_handle_ref (contact_handles, self_handle);
+  /* this causes us to have one ref to the self handle which is unreffed
+   * at the end of this function */
 
   priv->initial_members_aggregator = tp_handle_set_new (contact_handles);
 
@@ -325,6 +325,9 @@ gabble_muc_channel_constructor (GType type, guint n_props,
       g_assert (error == NULL);
       g_array_free (members, TRUE);
     }
+
+  tp_handle_unref (contact_handles, self_handle);
+
   return obj;
 }
 
-- 
1.5.6.3




More information about the Telepathy-commits mailing list