[next] telepathy-glib: base-connection: return from RequestHandles if called with no names
Jonny Lamb
jonny at kemper.freedesktop.org
Fri Aug 31 03:18:50 PDT 2012
Module: telepathy-glib
Branch: next
Commit: b0e97c3827c4f5da668e0472afa0f02f7b533a47
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=b0e97c3827c4f5da668e0472afa0f02f7b533a47
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Tue Jul 10 15:24:08 2012 +0100
base-connection: return from RequestHandles if called with no names
Since we added async handle normalization functions, RequestHandles(1, [])
would just not return at all.
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/base-connection.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 4bfa143..d0447ef 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -2738,6 +2738,14 @@ tp_base_connection_dbus_request_handles (TpSvcConnection *iface,
count = g_strv_length ((GStrv) names);
+ if (count == 0)
+ {
+ GArray *tmp = g_array_sized_new (FALSE, TRUE, sizeof (guint), 0);
+ tp_svc_connection_return_from_request_handles (context, tmp);
+ g_array_unref (tmp);
+ return;
+ }
+
request = g_slice_new0 (RequestHandlesData);
request->handles = g_array_sized_new (FALSE, TRUE, sizeof (guint), count);
request->n_pending = count;
More information about the telepathy-commits
mailing list