aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:48 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-03-11 20:22:48 +0800
commitdcba4239d985c35ba31889dc33cfa066bea5ccc3 (patch)
tree72aecc69b885da411a51a2825f87fcfdbae9f25f
parent7cb2a8aebca7cd898f2012b6c9eb0aa6bf0d18df (diff)
downloadgsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar.gz
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar.bz2
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar.lz
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar.xz
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.tar.zst
gsoc2013-empathy-dcba4239d985c35ba31889dc33cfa066bea5ccc3.zip
Don't wait for connection-ready if it was already ready.
svn path=/trunk/; revision=761
-rw-r--r--libempathy/empathy-tp-contact-factory.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index bbb17394b..7dbd219bd 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -829,6 +829,7 @@ tp_contact_factory_status_updated (EmpathyTpContactFactory *tp_factory)
{
EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
TpConn *tp_conn;
+ gboolean connection_ready;
if (priv->connection) {
/* We already have our connection object */
@@ -847,9 +848,15 @@ tp_contact_factory_status_updated (EmpathyTpContactFactory *tp_factory)
g_signal_connect_swapped (priv->connection, "invalidated",
G_CALLBACK (tp_contact_factory_connection_invalidated_cb),
tp_factory);
- g_signal_connect_swapped (priv->connection, "notify::connection-ready",
- G_CALLBACK (tp_contact_factory_connection_ready_cb),
- tp_factory);
+
+ g_object_get (priv->connection, "connection-ready", &connection_ready, NULL);
+ if (connection_ready) {
+ tp_contact_factory_connection_ready_cb (tp_factory);
+ } else {
+ g_signal_connect_swapped (priv->connection, "notify::connection-ready",
+ G_CALLBACK (tp_contact_factory_connection_ready_cb),
+ tp_factory);
+ }
}
static void
@@ -1195,6 +1202,7 @@ tp_contact_factory_finalize (GObject *object)
g_list_free (priv->contacts);
g_object_unref (priv->mc);
g_object_unref (priv->account);
+ g_object_unref (priv->user);
if (priv->connection) {
g_object_unref (priv->connection);