diff options
author | Dmitry Torokhov <dtor@chromium.org> | 2021-04-07 15:33:47 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-04-08 10:36:23 -0700 |
commit | b5b7e6203b9303b20751f4ef0ad2d6a01a671ae9 (patch) | |
tree | 3e4fcbf99e855efa94ec9b2fb3a904fe9fe141b3 /profiles/input | |
parent | 8f15296d8b3e6f2a42e7bc92fc2c9e6b218f360e (diff) | |
download | bluez-b5b7e6203b9303b20751f4ef0ad2d6a01a671ae9.tar.gz |
input/hog-lib: do not silently ignore missing connection in read_char()
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.
Diffstat (limited to 'profiles/input')
-rw-r--r-- | profiles/input/hog-lib.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c index ecd15ad73..3bbe42370 100644 --- a/profiles/input/hog-lib.c +++ b/profiles/input/hog-lib.c @@ -184,10 +184,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; |