[PATCH BlueZ] Fix registering HoG service for non-HoG profiles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to handle the case that the device has multiple HoG services,
but before registering we must check the service UUID.
---
 profiles/input/hog_manager.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profiles/input/hog_manager.c b/profiles/input/hog_manager.c
index 362c38a..9dbaff2 100644
--- a/profiles/input/hog_manager.c
+++ b/profiles/input/hog_manager.c
@@ -91,6 +91,9 @@ static int hog_device_probe(struct btd_profile *p, struct btd_device *device,
 		struct gatt_primary *prim = l->data;
 		struct hog_device *hogdev;
 
+		if (strcmp(prim->uuid, HOG_UUID) != 0)
+			continue;
+
 		hogdev = hog_device_register(device, prim);
 		if (hogdev == NULL)
 			continue;
-- 
1.7.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux