Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] Fix registering HoG service for non-HoG profiles
@ 2012-10-09  0:04 Vinicius Costa Gomes
  2012-10-09  8:53 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Costa Gomes @ 2012-10-09  0:04 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Vinicius Costa Gomes

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-09  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-09  0:04 [PATCH BlueZ] Fix registering HoG service for non-HoG profiles Vinicius Costa Gomes
2012-10-09  8:53 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox