From 02a49b3c9689c780a40ed5ba94ae8b2c6588c425 Mon Sep 17 00:00:00 2001 From: wu zheng Date: Fri, 12 Dec 2014 17:08:50 +0800 Subject: [PATCH] Modify the param of authorize service NTB need to match the current of Bluetooth-Frwk. Therefore, the param of authorize service is modified. The test program need to be modified too. Change-Id: I0d6a17d27f800bbbc112e40c1d113c4907b162dc Signed-off-by: Wu Zheng --- client/agent.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/agent.c b/client/agent.c index eeabd5b..54c83fc 100644 --- a/client/agent.c +++ b/client/agent.c @@ -295,11 +295,13 @@ static DBusMessage *authorize_service(DBusConnection *conn, { const char *device, *uuid; char *str; + int fd; rl_printf("Authorize service\n"); dbus_message_get_args(msg, NULL, DBUS_TYPE_OBJECT_PATH, &device, - DBUS_TYPE_STRING, &uuid, DBUS_TYPE_INVALID); + DBUS_TYPE_STRING, &uuid, + DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_INVALID); str = g_strdup_printf("Authorize service %s (yes/no): ", uuid); agent_prompt(str); @@ -344,7 +346,8 @@ static const GDBusMethodTable methods[] = { GDBUS_ARGS({ "device", "o" }), NULL, request_authorization) }, { GDBUS_ASYNC_METHOD("AuthorizeService", - GDBUS_ARGS({ "device", "o" }, { "uuid", "s" }), + GDBUS_ARGS({ "device", "o" }, { "uuid", "s" }, + {"fd", "h"}), NULL, authorize_service) }, { GDBUS_METHOD("Cancel", NULL, NULL, cancel_request) }, { } -- 2.7.4