core/adapter: Check if service is blocked before authorizing
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sat, 8 Feb 2014 12:39:35 +0000 (14:39 +0200)
committerMikko Ylinen <mikko.ylinen@intel.com>
Tue, 23 Sep 2014 18:29:22 +0000 (21:29 +0300)
This add a call to device_is_service_blocked before authorizing a
connection.

src/adapter.c

index 18c91f5..ac42b7d 100644 (file)
@@ -4627,6 +4627,11 @@ static gboolean process_auth_queue(gpointer user_data)
                if (auth->svc_id > 0)
                        return TRUE;
 
+               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;