sjanc commented on code in PR #1660:
URL: https://github.com/apache/mynewt-nimble/pull/1660#discussion_r1424970147


##########
nimble/host/src/ble_gatts.c:
##########
@@ -1587,6 +1587,8 @@ ble_gatts_peer_cl_sup_feat_update(uint16_t conn_handle, 
struct os_mbuf *om)
     int rc = 0;
     int feat_idx = 0;
     int i;
+    /* decimal(7) = binary(0000 0111) */
+    uint8_t rfu_mask = 7;

Review Comment:
   this should be a define (preferably defined after 
BLE_SVC_GATT_CLI_SUP_FEAT_* defines)
   eg
   
   #define BLE_SVC_GATT_CLI_SUP_FEAT_MASK 
(BLE_SVC_GATT_CLI_SUP_FEAT_ROBUST_CATCHING_BIT | 
BLE_SVC_GATT_CLI_SUP_FEAT_EATT_BIT | BLE_SVC_GATT_CLI_SUP_FEAT_MULT_NTF_BIT)
   



##########
nimble/host/src/ble_gatts.c:
##########
@@ -1618,10 +1620,15 @@ ble_gatts_peer_cl_sup_feat_update(uint16_t conn_handle, 
struct os_mbuf *om)
              */
             if (conn->bhc_gatt_svr.peer_cl_sup_feat[feat_idx] >
                 om->om_data[i]) {
-                rc = BLE_HS_EINVAL;
+                rc = BLE_ATT_ERR_VALUE_NOT_ALLOWED;

Review Comment:
   so this looks odd as now this function return either BLE_HS_ errors or 
BLE_ATT_ERR
   
   
   



-- 
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]

Reply via email to