summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-database.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-04-08 21:28:26 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-04-08 21:28:26 +0000
commita6bf5ec452e5426906fc9991d738e3a5ae27050c (patch)
tree4918762c3b37dab071e64a34d43de85ca9aaa521 /hcid/dbus-database.c
parent38e740cddb16d29f4dae3b289dcd0830d6246988 (diff)
cleanup: connection status is verified twice for RequestAuthorization
Diffstat (limited to 'hcid/dbus-database.c')
-rw-r--r--hcid/dbus-database.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c
index 93f37ad4..4479f78c 100644
--- a/hcid/dbus-database.c
+++ b/hcid/dbus-database.c
@@ -409,14 +409,15 @@ static DBusHandlerResult unregister_service(DBusConnection *conn,
static DBusHandlerResult request_authorization(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- const char *sender, *address, *path;
+ const char *sender, *address, *uuid;
struct service *service;
+ char path[MAX_PATH_LENGTH];
bdaddr_t bdaddr;
gboolean trusted;
int adapter_id;
if (dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &address,
- DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID) == FALSE)
+ DBUS_TYPE_STRING, &uuid, DBUS_TYPE_INVALID) == FALSE)
return error_invalid_arguments(conn, msg, NULL);
sender = dbus_message_get_sender(msg);
@@ -449,7 +450,9 @@ static DBusHandlerResult request_authorization(DBusConnection *conn,
return send_message_and_unref(conn, reply);
}
- return handle_authorize_request_old(conn, msg, service, address, path);
+ snprintf(path, sizeof(path), "/org/bluez/hci%d", adapter_id);
+ return handle_authorize_request_old(conn, msg,
+ service, path, address, uuid);
}
static DBusHandlerResult cancel_authorization_request(DBusConnection *conn,