[next] telepathy-glib: Raise error if connection is invalidated in _upgrade_contacts_async() and _by_id_async()

Xavier Claessens xclaesse at kemper.freedesktop.org
Mon May 14 04:28:11 PDT 2012


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

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Mon May 14 13:23:44 2012 +0200

Raise error if connection is invalidated in _upgrade_contacts_async() and _by_id_async()

---

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

diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 3aeed73..949b0da 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -3185,6 +3185,13 @@ tp_connection_dup_contact_by_id_async (TpConnection *self,
   if (!get_feature_flags (features, &feature_flags))
     return;
 
+  if (tp_proxy_get_invalidated (self) != NULL)
+    {
+      g_simple_async_report_gerror_in_idle ((GObject *) self,
+          callback, user_data, tp_proxy_get_invalidated (self));
+      return;
+    }
+
   if (!tp_proxy_has_interface_by_id (self,
         TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
     {
@@ -3328,6 +3335,13 @@ tp_connection_upgrade_contacts_async (TpConnection *self,
   if (!get_feature_flags (features, &feature_flags))
     return;
 
+  if (tp_proxy_get_invalidated (self) != NULL)
+    {
+      g_simple_async_report_gerror_in_idle ((GObject *) self,
+          callback, user_data, tp_proxy_get_invalidated (self));
+      return;
+    }
+
   if (!tp_proxy_has_interface_by_id (self,
         TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
     {



More information about the telepathy-commits mailing list