diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-07-10 15:24:08 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-07-10 15:24:08 +0100 |
commit | b0e97c3827c4f5da668e0472afa0f02f7b533a47 (patch) | |
tree | a7361b2a5266cae09ac8948299c6d72d4e884506 | |
parent | 4e35e0198e6a21d68f25adfe896f50afa74e3f2b (diff) | |
download | telepathy-glib-b0e97c3827c4f5da668e0472afa0f02f7b533a47.tar.gz |
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@collabora.co.uk>
-rw-r--r-- | 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 4bfa1433d..d0447ef48 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; |