[next] telepathy-glib: TpContact: make sure callback is cancelled if weak_object dies

Xavier Claessens xclaesse at kemper.freedesktop.org
Thu May 3 10:25:42 PDT 2012


Module: telepathy-glib
Branch: next
Commit: 2730edb3f0b653a3170b8b0f7e35b4c9d85e2b28
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=2730edb3f0b653a3170b8b0f7e35b4c9d85e2b28

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Thu May  3 18:01:24 2012 +0200

TpContact: make sure callback is cancelled if weak_object dies

In the case contacts_context_complete_in_idle() is used, it is possible
that the weak object dies in the idle.

---

 telepathy-glib/contact.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 53cc4b7..a75d990 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -1952,6 +1952,9 @@ contacts_context_fail (ContactsContext *c,
 static gboolean
 contacts_context_complete (ContactsContext *c)
 {
+  if (c->no_purpose_in_life)
+    return FALSE;
+
   switch (c->signature)
     {
     case CB_BY_HANDLE:



More information about the telepathy-commits mailing list