-
Notifications
You must be signed in to change notification settings - Fork 399
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
nimble/gatts: Modify client supported features READ #1661
Conversation
Roshan23699
commented
Dec 12, 2023
- Fix read on client-supported features.
- Read cannot return the local client-supported features, it should return the client-supported features for the reading connection. (This change is needed for PTS).
8b7e13c
to
0a009b1
Compare
@sjanc could you PTAL ? |
Hi, which test was affected by this? |
GATT/SR/GAS/BV-03-C |
nimble/host/include/host/ble_gatt.h
Outdated
* error. | ||
* | ||
*/ | ||
int ble_gatts_get_peer_cl_sup_feat(uint16_t conn_handle, uint8_t *out_supported_feat); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please name it ble_gatts_peer_cl_sup_feat_get(), also there should be len parameter for how many bytes are available in out_supported_feat array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
goto done; | ||
} | ||
|
||
memcpy(out_supported_feat, conn->bhc_gatt_svr.peer_cl_sup_feat, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should copy no more than N bytes of mentioned length parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should copy no more than N bytes of mentioned length parameter
and maybe N should be checked as N < BLE_GATT_CHR_CLI_SUP_FEAT_SZ
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either, if buffer is smaller we can fill just up to its size and ignore rest, currently only 3 bits are defined so it will be 1 for some time anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ea27765
to
822025d
Compare
822025d
to
492f02b
Compare