[telepathy-glib/master] account: free the cached TpConnection if the connection object path changes

Jonny Lamb jonny.lamb at collabora.co.uk
Sat Sep 26 08:21:54 PDT 2009


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 telepathy-glib/account.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 957a173..fe7c49f 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -535,6 +535,13 @@ _tp_account_update (TpAccount *account,
 
       priv->connection_object_path =
         g_strdup (tp_asv_get_object_path (properties, "Connection"));
+
+      if (priv->connection != NULL)
+        {
+          if (tp_strdiff (priv->connection_object_path,
+                  tp_proxy_get_object_path (priv->connection)))
+            _tp_account_free_connection (account);
+        }
     }
 
   if (g_hash_table_lookup (properties, "ConnectAutomatically") != NULL)
-- 
1.5.6.5




More information about the telepathy-commits mailing list