aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 06:15:29 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 06:21:56 +0800
commit7894d6060831bbb8134386cb24e1cf741a146ace (patch)
tree95d02119cea9002ce94557c3c4847d9977721e5d /libempathy
parent25bd33610962da0a8ff8dba645ac84e9f84d7e4f (diff)
downloadgsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar.gz
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar.bz2
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar.lz
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar.xz
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.tar.zst
gsoc2013-empathy-7894d6060831bbb8134386cb24e1cf741a146ace.zip
Ensure that the connection data is setup when handle channels
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)