diff options
author | Cosimo Cecchi <cosimo.cecchi@collabora.co.uk> | 2009-05-23 21:42:02 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-06-01 23:53:23 +0800 |
commit | b9c4083bc1c4924171bc0095d1489f6354534960 (patch) | |
tree | 6d29d90d44d4c22927416f695e7660bca506255a /libempathy/empathy-dispatcher.c | |
parent | fec609875fd59ec0d50114e638620e3d372c511e (diff) | |
download | gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar.gz gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar.bz2 gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar.lz gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar.xz gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.tar.zst gsoc2013-empathy-b9c4083bc1c4924171bc0095d1489f6354534960.zip |
Actually see if the connection is ready
Before appending an outstanding request for channel classes, verify
thigns aren't actually ready.
Diffstat (limited to 'libempathy/empathy-dispatcher.c')
-rw-r--r-- | libempathy/empathy-dispatcher.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c index 04e248d2d..1dc44b309 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -1432,13 +1432,22 @@ find_channel_class_idle_cb (gpointer user_data) GStrv retval; GList *requests; FindChannelRequest *request = user_data; + ConnectionData *cd; + gboolean is_ready = TRUE; EmpathyDispatcherPriv *priv = GET_PRIV (request->dispatcher); - retval = empathy_dispatcher_find_channel_class (request->dispatcher, - request->connection, request->channel_type, request->handle_type); + cd = g_hash_table_lookup (priv->connections, request->connection); + + if (cd == NULL) + is_ready = FALSE; + else if (cd->requestable_channels == NULL) + is_ready = FALSE; - if (retval) + if (is_ready) { + retval = empathy_dispatcher_find_channel_class (request->dispatcher, + request->connection, request->channel_type, request->handle_type); + request->callback (retval, request->user_data); free_find_channel_request (request); return FALSE; |