[Telepathy-commits] [telepathy-glib/master] TpBaseConnection: improve sequence of events for channel factories
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Oct 30 09:31:06 PDT 2008
We want to return from RequestChannel, then emit NewChannels, then
NewChannel.
Rationale:
* requester should get its answer first, so it can alter its handling of
NewChannels accordingly
* clients that didn't introspect the Connection (so don't know whether
to expect NewChannels) get the more informative signal first
---
telepathy-glib/base-connection.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 116a1eb..88ad9a3 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -831,22 +831,22 @@ factory_satisfy_requests (TpBaseConnection *conn,
handle, channel_request,
&suppress_handler);
+ for (i = 0; i < tmp->len; i++)
+ satisfy_request (conn, g_ptr_array_index (tmp, i), G_OBJECT (chan),
+ object_path);
+
if (is_new)
{
GPtrArray *array = g_ptr_array_sized_new (1);
- tp_svc_connection_emit_new_channel (conn, object_path, channel_type,
- handle_type, handle, suppress_handler);
-
g_ptr_array_add (array, get_channel_details (G_OBJECT (chan)));
tp_svc_connection_interface_requests_emit_new_channels (conn, array);
g_value_array_free (g_ptr_array_index (array, 0));
g_ptr_array_free (array, TRUE);
- }
- for (i = 0; i < tmp->len; i++)
- satisfy_request (conn, g_ptr_array_index (tmp, i), G_OBJECT (chan),
- object_path);
+ tp_svc_connection_emit_new_channel (conn, object_path, channel_type,
+ handle_type, handle, suppress_handler);
+ }
g_ptr_array_free (tmp, TRUE);
--
1.5.6.5
More information about the Telepathy-commits
mailing list