aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 465f23b75..c1a19f699 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -104,6 +104,10 @@ enum
static guint signals[LAST_SIGNAL];
static EmpathyDispatcher *dispatcher = NULL;
+static void dispatcher_init_connection_if_needed (
+ EmpathyDispatcher *dispatcher,
+ TpConnection *connection);
+
static GList * empathy_dispatcher_find_channel_classes
(EmpathyDispatcher *dispatcher, TpConnection *connection,
const gchar *channel_type, guint handle_type, GArray *fixed_properties);
@@ -590,6 +594,8 @@ dispatcher_connection_new_channel (EmpathyDispatcher *dispatcher,
NULL
};
+ dispatcher_init_connection_if_needed (dispatcher, connection);
+
cd = g_hash_table_lookup (priv->connections, connection);
/* Don't bother with channels we have already dispatched or are dispatching
@@ -784,9 +790,8 @@ dispatcher_connection_advertise_capabilities_cb (TpConnection *connection,
}
static void
-dispatcher_new_connection_cb (EmpathyAccountManager *manager,
- TpConnection *connection,
- EmpathyDispatcher *dispatcher)
+dispatcher_init_connection_if_needed (EmpathyDispatcher *dispatcher,
+ TpConnection *connection)
{
EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
GPtrArray *capabilities;
@@ -836,6 +841,14 @@ dispatcher_new_connection_cb (EmpathyAccountManager *manager,
}
static void
+dispatcher_new_connection_cb (EmpathyAccountManager *manager,
+ TpConnection *connection,
+ EmpathyDispatcher *dispatcher)
+{
+ dispatcher_init_connection_if_needed (dispatcher, connection);
+}
+
+static void
remove_idle_handlers (gpointer key,
gpointer value,
gpointer user_data)