Bluetooth: Fix assertion condition in bt_gatt_discover
This fixes invalid assert condition. As stated in Bluetooth Core v5.0 Vol 3 Part F 3.4.4.1 Read By Type Request && 3.4.4.9 Read by Group Type Request "The starting handle shall be less than or equal to the ending handle." 3.4.3.1 Find Information Request && 3.4.3.3 Find By Type Value Request "Only attributes with attribute handles between and including the Starting Handle parameter and the Ending Handle parameter that match the requested attribute type and the attribute value that have sufficient permissions to allow reading will be returned." Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
354c8222f1
commit
48b7f236fa
1 changed files with 1 additions and 1 deletions
|
@ -1618,7 +1618,7 @@ int bt_gatt_discover(struct bt_conn *conn,
|
||||||
__ASSERT(params && params->func, "invalid parameters\n");
|
__ASSERT(params && params->func, "invalid parameters\n");
|
||||||
__ASSERT((params->start_handle && params->end_handle),
|
__ASSERT((params->start_handle && params->end_handle),
|
||||||
"invalid parameters\n");
|
"invalid parameters\n");
|
||||||
__ASSERT((params->start_handle < params->end_handle),
|
__ASSERT((params->start_handle <= params->end_handle),
|
||||||
"invalid parameters\n");
|
"invalid parameters\n");
|
||||||
|
|
||||||
if (conn->state != BT_CONN_CONNECTED) {
|
if (conn->state != BT_CONN_CONNECTED) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue