KKopyscinski commented on code in PR #1661:
URL: https://github.com/apache/mynewt-nimble/pull/1661#discussion_r1432667638
##########
nimble/host/src/ble_gatts.c:
##########
@@ -1580,6 +1580,31 @@ ble_gatts_chr_updated(uint16_t chr_val_handle)
}
}
+int
+ble_gatts_get_peer_cl_sup_feat(uint16_t conn_handle, uint8_t
*out_supported_feat)
+{
+ struct ble_hs_conn *conn;
+ int rc = 0;
+
+ if (out_supported_feat == NULL) {
+ return BLE_HS_EINVAL;
+ }
+
+ ble_hs_lock();
+ conn = ble_hs_conn_find(conn_handle);
+ if (conn == NULL) {
+ rc = BLE_HS_ENOTCONN;
+ goto done;
+ }
+
+ memcpy(out_supported_feat, conn->bhc_gatt_svr.peer_cl_sup_feat,
Review Comment:
> 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`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]