Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth: services: hogp: Pass GATT read's error code #18901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,10 @@ Binary libraries
Bluetooth libraries and services
--------------------------------

|no_changes_yet_note|
* :ref:`hogp_readme` library:

* The :c:func:`bt_hogp_rep_read` function forwards the GATT read error code through the registered user callback.
This ensures that API user is aware of the error.

Common Application Framework
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/services/hogp.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ static uint8_t rep_read_process(struct bt_conn *conn, uint8_t err,
length = UINT8_MAX;
}
rep->size = (uint8_t)length;
(void)rep->read_cb(rep->hogp, rep, 0, data);
(void)rep->read_cb(rep->hogp, rep, err, data);
rep->read_cb = NULL;
return BT_GATT_ITER_STOP;
}
Expand Down
Loading