summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-02-08 14:39:35 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2016-01-28 14:03:47 +0200
commitee8c910888bc582ed844d5b2ed9a5c8707070476 (patch)
tree1ce2994dd1f83a46dcc2548c8b8bb4742753fb3b
parentc4e5fc38e4449990bc55b6d75974a4d5413f971c (diff)
downloadbluez-ee8c910888bc582ed844d5b2ed9a5c8707070476.tar.gz
core/adapter: Check if service is blocked before authorizing
This add a call to device_is_service_blocked before authorizing a connection.
-rw-r--r--src/adapter.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index eaf1f5efc..c94de6e96 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5825,6 +5825,11 @@ static gboolean process_auth_queue(gpointer user_data)
if (auth->svc_id > 0)
return FALSE;
+ if (device_is_service_blocked(device, auth->uuid)) {
+ auth->cb(&err, auth->user_data);
+ goto next;
+ }
+
if (device_is_trusted(device) == TRUE) {
auth->cb(NULL, auth->user_data);
goto next;