[Telepathy-commits] [telepathy-mission-control/master] Don't disconnect the TpConnection if the proxy is invalid
Alberto Mardegan
alberto.mardegan at nokia.com
Wed Jan 7 00:58:06 PST 2009
Also, rewrite the function.
---
src/mcd-connection.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 9e53a6c..c42a846 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -379,18 +379,15 @@ disconnect_cb (TpConnection *proxy, const GError *error, gpointer user_data,
static void
_mcd_connection_call_disconnect (McdConnection *connection)
{
- McdConnectionPrivate *priv = connection->priv;
- guint status;
-
- if (!priv->tp_conn) return;
+ TpConnection *tp_conn = connection->priv->tp_conn;
- g_object_get (G_OBJECT (priv->tp_conn),
- "status", &status,
- NULL);
- if (status == TP_CONNECTION_STATUS_DISCONNECTED) return;
- tp_cli_connection_call_disconnect (priv->tp_conn, -1,
+ if (!tp_conn || TP_PROXY (tp_conn)->invalidated != NULL) return;
+
+ if (tp_connection_get_status (tp_conn, NULL) ==
+ TP_CONNECTION_STATUS_DISCONNECTED) return;
+ tp_cli_connection_call_disconnect (tp_conn, -1,
disconnect_cb,
- priv, NULL,
+ NULL, NULL,
(GObject *)connection);
}
--
1.5.6.5
More information about the Telepathy-commits
mailing list