All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] input/hog-lib: do not silently ignore missing connection in read_char()
@ 2021-04-07 22:33 Sonny Sasaka
  2021-04-07 23:05 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Sonny Sasaka @ 2021-04-07 22:33 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Dmitry Torokhov

From: Dmitry Torokhov <dtor@chromium.org>

Currently we silently ignore missing connection (attrib) in read_char(),
but not in the other GATT interfaces (such as write_char, discover_desc,
etc). The code should avoid calling read_char() when there is no active
connection instead, and logging errors will help us trace the offenders.

---
 profiles/input/hog-lib.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index 6ac14e401..6605538cf 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
@@ -181,10 +181,6 @@ static void read_char(struct bt_hog *hog, GAttrib *attrib, uint16_t handle,
 	struct gatt_request *req;
 	unsigned int id;
 
-	/* Ignore if not connected */
-	if (!attrib)
-		return;
-
 	req = create_request(hog, user_data);
 	if (!req)
 		return;
-- 
2.31.0


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

* RE: [BlueZ] input/hog-lib: do not silently ignore missing connection in read_char()
  2021-04-07 22:33 [PATCH BlueZ] input/hog-lib: do not silently ignore missing connection in read_char() Sonny Sasaka
@ 2021-04-07 23:05 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2021-04-07 23:05 UTC (permalink / raw)
  To: linux-bluetooth, sonnysasaka

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=462829

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild: Setup ELL - PASS

##############################
Test: CheckBuild: Setup - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

##############################
Test: CheckBuild w/external ell - PASS



---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2021-04-07 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 22:33 [PATCH BlueZ] input/hog-lib: do not silently ignore missing connection in read_char() Sonny Sasaka
2021-04-07 23:05 ` [BlueZ] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.