summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiraj Razick <siraj.razick@collabora.co.uk>2012-03-25 12:16:14 -0400
committerSiraj Razick <siraj.razick@collabora.co.uk>2012-03-26 10:31:35 -0400
commita85536dcf3e76b285bd4a9ab45638df2e9eade95 (patch)
tree987df5854547642d2b1c07b63729ead98163d712
parent39b2dbcf375dbe97c5d5523ad2de7d456757d072 (diff)
downloadtelepathy-salut-a85536dcf3e76b285bd4a9ab45638df2e9eade95.tar.gz
bonjour-contact-manager: Unref contact only if it has no services
We remove the contact ref only if it has no services
-rw-r--r--src/bonjour-contact-manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bonjour-contact-manager.c b/src/bonjour-contact-manager.c
index 42bf74b6..a10da1ef 100644
--- a/src/bonjour-contact-manager.c
+++ b/src/bonjour-contact-manager.c
@@ -200,7 +200,11 @@ _salut_bonjour_service_browse_cb (DNSServiceRef service,
{
salut_bonjour_contact_remove_service (SALUT_BONJOUR_CONTACT (contact),
interfaceIndex, name, regtype, domain);
- g_object_unref (contact);
+ if (!salut_bonjour_contact_has_services
+ (SALUT_BONJOUR_CONTACT (contact)))
+ {
+ g_object_unref (contact);
+ }
}
else
{