aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-contact-factory.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-19 19:46:04 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-23 19:33:18 +0800
commit14e27827e307997db9ec5ad216900cd5282c2864 (patch)
tree164b0b09e3d98cc31aef83ce02210f08ebacd6c3 /libempathy/empathy-tp-contact-factory.c
parent9da605b25b64e25bc6a1b7651d001ea451fbeac9 (diff)
downloadgsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar.gz
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar.bz2
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar.lz
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar.xz
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.tar.zst
gsoc2013-empathy-14e27827e307997db9ec5ad216900cd5282c2864.zip
empathy_tp_contact_factory_get_from_{id,handle} shouldn't pass the ref of the contact to the cb
This match the behaviour of empathy_tp_contact_factory_get_from_{ids,handles} and tp_connection_get_contacts_by_handle.
Diffstat (limited to 'libempathy/empathy-tp-contact-factory.c')
-rw-r--r--libempathy/empathy-tp-contact-factory.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index 70bf94899..1a8d5fbdc 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -966,8 +966,12 @@ get_contact_by_id_cb (TpConnection *connection,
error,
data->user_data, weak_object);
}
+
+ if (contact != NULL)
+ g_object_unref (contact);
}
+/* The callback is NOT given a reference to the EmpathyContact objects */
void
empathy_tp_contact_factory_get_from_id (EmpathyTpContactFactory *tp_factory,
const gchar *id,
@@ -1059,6 +1063,7 @@ empathy_tp_contact_factory_get_from_handles (EmpathyTpContactFactory *tp_factory
weak_object);
}
+/* The callback is NOT given a reference to the EmpathyContact objects */
static void
get_contact_by_handle_cb (TpConnection *connection,
guint n_contacts,
@@ -1100,6 +1105,8 @@ get_contact_by_handle_cb (TpConnection *connection,
}
g_clear_error (&err);
+ if (contact != NULL)
+ g_object_unref (contact);
}
void