Thread (2 messages) flat view 2 messages, 2 authors, 2021-04-07
STALE1995d

[PATCH BlueZ] input/hog-lib: avoid scanning characteristics too early

From: Sonny Sasaka <hidden>
Date: 2021-04-07 22:34:24
Subsystem: the rest · Maintainer: Linus Torvalds

From: Dmitry Torokhov <redacted>

We need to have active connection to fully discover a HOG instance,
and in the chain

	bt_hog_new()->
		gatt_db_foreach_service()->
		foreach_hog_service()->
		hog_attach_instance()

we have not set up hog->attrib yet. So let's skip calling
foreach_hog_chrc() from hog_attach_instance(), especially since
we will be calling bt_hog_attach() pretty much immediately after
bt_hog_new(), and we will be discovering characteristics there anyway.

---
 profiles/input/hog-lib.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index 6ac14e401..a9ecabad0 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -1428,7 +1428,6 @@ static void hog_attach_instance(struct bt_hog *hog,
 
 	if (!hog->attr) {
 		hog->attr = attr;
-		gatt_db_service_foreach_char(hog->attr, foreach_hog_chrc, hog);
 		return;
 	}
 
-- 
2.31.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help