diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-04-10 14:06:44 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-04-10 14:06:44 +0000 |
commit | c853057d20c7539d5214d0a126055baacb60887f (patch) | |
tree | a94452b4aff3c2cc6ed686e4b7872b1057b61ae2 /hcid/dbus-service.c | |
parent | 2a209d402e7cc324d03fb7172ac892626068d00b (diff) |
Implement global trust setting
Diffstat (limited to 'hcid/dbus-service.c')
-rw-r--r-- | hcid/dbus-service.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index fe4f24df..d9ce3536 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -526,7 +526,7 @@ static DBusHandlerResult set_trusted(DBusConnection *conn, if (!reply) return DBUS_HANDLER_RESULT_NEED_MEMORY; - write_trust(address, service->ident, TRUE); + write_trust(BDADDR_ANY, address, service->ident, TRUE); return send_message_and_unref(conn, reply); } @@ -547,7 +547,7 @@ static DBusHandlerResult is_trusted(DBusConnection *conn, if (check_address(address) < 0) return error_invalid_arguments(conn, msg); - trusted = read_trust(address, service->ident); + trusted = read_trust(BDADDR_ANY, address, service->ident); reply = dbus_message_new_method_return(msg); if (!reply) @@ -575,7 +575,7 @@ static DBusHandlerResult remove_trust(DBusConnection *conn, if (check_address(address) < 0) return error_invalid_arguments(conn, msg); - write_trust(address, service->ident, FALSE); + write_trust(BDADDR_ANY, address, service->ident, FALSE); reply = dbus_message_new_method_return(msg); if (!reply) @@ -646,7 +646,8 @@ static int register_service(struct service *service) int i; if (g_slist_find_custom(services, service->ident, - (GCompareFunc) service_cmp_ident)) + (GCompareFunc) service_cmp_ident) + || !strcmp(service->ident, GLOBAL_TRUST)) return -EADDRINUSE; if (service->external) { |