aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-09-15 21:33:54 +0800
committerCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-09-16 19:20:27 +0800
commit3c3d82a778c7f085bb0f9250c8ea109019a7a5e1 (patch)
tree556802fc7755ac9b8eb0172f6f2f64f4aaac17eb
parent324a3823750279b14a6251c793bf36a7a821faa6 (diff)
downloadgsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar.gz
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar.bz2
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar.lz
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar.xz
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.tar.zst
gsoc2013-empathy-3c3d82a778c7f085bb0f9250c8ea109019a7a5e1.zip
Dispatch existing channels once we initialize the connection.
-rw-r--r--libempathy/empathy-dispatcher.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 18647e4e2..0cd490b86 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -748,6 +748,7 @@ dispatcher_connection_got_all (TpProxy *proxy,
EmpathyDispatcher *dispatcher = EMPATHY_DISPATCHER (object);
EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
GPtrArray *requestable_channels;
+ GPtrArray *existing_channels;
if (error) {
DEBUG ("Error: %s", error->message);
@@ -792,6 +793,26 @@ dispatcher_connection_got_all (TpProxy *proxy,
g_hash_table_remove (priv->outstanding_classes_requests, proxy);
}
+
+ existing_channels = tp_asv_get_boxed (properties,
+ "Channels", TP_ARRAY_TYPE_CHANNEL_DETAILS_LIST);
+
+ if (existing_channels != NULL)
+ {
+ int idx;
+
+ for (idx = 0; idx < existing_channels->len; idx++)
+ {
+ GValueArray *values = g_ptr_array_index (existing_channels, idx);
+ const gchar *object_path;
+ GHashTable *properties;
+
+ object_path = g_value_get_boxed (g_value_array_get_nth (values, 0));
+ properties = g_value_get_boxed (g_value_array_get_nth (values, 1));
+ dispatcher_connection_new_channel_with_properties (dispatcher,
+ TP_CONNECTION (proxy), object_path, properties);
+ }
+ }
}
static void