github-advanced-security[bot] commented on code in PR #1787:
URL: https://github.com/apache/mynewt-nimble/pull/1787#discussion_r1613516484


##########
nimble/host/src/ble_eatt.c:
##########
@@ -389,48 +388,48 @@
     return BLE_HS_EDONE;
 }
 
-static int
-ble_gatt_eatt_read_uuid_cb(uint16_t conn_handle,
-                           const struct ble_gatt_error *error,
-                           struct ble_gatt_attr *attr, void *arg)
-{
-    uint8_t supported_features;
-    int rc;
-
-    if (error == NULL || (error->status != 0 && error->status != 
BLE_HS_EDONE)) {
-        BLE_EATT_LOG_DEBUG("eatt: Cannot find Server Supported features on 
peer device\n");
-        return BLE_HS_EDONE;
-    }
-
-    if (attr == NULL) {
-        BLE_EATT_LOG_ERROR("eatt: Invalid attribute \n");
-        return BLE_HS_EDONE;
-    }
-
-    rc = os_mbuf_copydata(attr->om, 0, 1, &supported_features);
-    if (rc) {
-        BLE_EATT_LOG_ERROR("eatt: Cannot read srv supported features \n");
-        return BLE_HS_EDONE;
-    }
-
-    if (supported_features & 0x01) {
-        ble_npl_event_set_arg(&g_read_sup_cl_feat_ev, 
UINT_TO_POINTER(conn_handle));
-        ble_npl_eventq_put(ble_hs_evq_get(), &g_read_sup_cl_feat_ev);
-    }
-    return BLE_HS_EDONE;
-}
-
-static void
-ble_gatt_eatt_read_svr_uuid(struct ble_npl_event *ev)
-{
-    uint16_t conn_handle;
-
-    conn_handle = POINTER_TO_UINT(ble_npl_event_get_arg(ev));
-
-    ble_gattc_read_by_uuid(conn_handle, 1, 0xffff,
-                           
BLE_UUID16_DECLARE(BLE_SVC_GATT_CHR_SERVER_SUPPORTED_FEAT_UUID16),
-                           ble_gatt_eatt_read_uuid_cb, NULL);
-}
+//static int
+//ble_gatt_eatt_read_uuid_cb(uint16_t conn_handle,
+//                           const struct ble_gatt_error *error,
+//                           struct ble_gatt_attr *attr, void *arg)
+//{
+//    uint8_t supported_features;
+//    int rc;
+//
+//    if (error == NULL || (error->status != 0 && error->status != 
BLE_HS_EDONE)) {
+//        BLE_EATT_LOG_DEBUG("eatt: Cannot find Server Supported features on 
peer device\n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    if (attr == NULL) {
+//        BLE_EATT_LOG_ERROR("eatt: Invalid attribute \n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    rc = os_mbuf_copydata(attr->om, 0, 1, &supported_features);
+//    if (rc) {
+//        BLE_EATT_LOG_ERROR("eatt: Cannot read srv supported features \n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    if (supported_features & 0x01) {
+//        ble_npl_event_set_arg(&g_read_sup_cl_feat_ev, 
UINT_TO_POINTER(conn_handle));
+//        ble_npl_eventq_put(ble_hs_evq_get(), &g_read_sup_cl_feat_ev);
+//    }
+//    return BLE_HS_EDONE;
+//}

Review Comment:
   ## Commented-out code
   
   This comment appears to contain commented-out code.
   
   [Show more 
details](https://github.com/apache/mynewt-nimble/security/code-scanning/123)



##########
nimble/host/src/ble_eatt.c:
##########
@@ -389,48 +388,48 @@
     return BLE_HS_EDONE;
 }
 
-static int
-ble_gatt_eatt_read_uuid_cb(uint16_t conn_handle,
-                           const struct ble_gatt_error *error,
-                           struct ble_gatt_attr *attr, void *arg)
-{
-    uint8_t supported_features;
-    int rc;
-
-    if (error == NULL || (error->status != 0 && error->status != 
BLE_HS_EDONE)) {
-        BLE_EATT_LOG_DEBUG("eatt: Cannot find Server Supported features on 
peer device\n");
-        return BLE_HS_EDONE;
-    }
-
-    if (attr == NULL) {
-        BLE_EATT_LOG_ERROR("eatt: Invalid attribute \n");
-        return BLE_HS_EDONE;
-    }
-
-    rc = os_mbuf_copydata(attr->om, 0, 1, &supported_features);
-    if (rc) {
-        BLE_EATT_LOG_ERROR("eatt: Cannot read srv supported features \n");
-        return BLE_HS_EDONE;
-    }
-
-    if (supported_features & 0x01) {
-        ble_npl_event_set_arg(&g_read_sup_cl_feat_ev, 
UINT_TO_POINTER(conn_handle));
-        ble_npl_eventq_put(ble_hs_evq_get(), &g_read_sup_cl_feat_ev);
-    }
-    return BLE_HS_EDONE;
-}
-
-static void
-ble_gatt_eatt_read_svr_uuid(struct ble_npl_event *ev)
-{
-    uint16_t conn_handle;
-
-    conn_handle = POINTER_TO_UINT(ble_npl_event_get_arg(ev));
-
-    ble_gattc_read_by_uuid(conn_handle, 1, 0xffff,
-                           
BLE_UUID16_DECLARE(BLE_SVC_GATT_CHR_SERVER_SUPPORTED_FEAT_UUID16),
-                           ble_gatt_eatt_read_uuid_cb, NULL);
-}
+//static int
+//ble_gatt_eatt_read_uuid_cb(uint16_t conn_handle,
+//                           const struct ble_gatt_error *error,
+//                           struct ble_gatt_attr *attr, void *arg)
+//{
+//    uint8_t supported_features;
+//    int rc;
+//
+//    if (error == NULL || (error->status != 0 && error->status != 
BLE_HS_EDONE)) {
+//        BLE_EATT_LOG_DEBUG("eatt: Cannot find Server Supported features on 
peer device\n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    if (attr == NULL) {
+//        BLE_EATT_LOG_ERROR("eatt: Invalid attribute \n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    rc = os_mbuf_copydata(attr->om, 0, 1, &supported_features);
+//    if (rc) {
+//        BLE_EATT_LOG_ERROR("eatt: Cannot read srv supported features \n");
+//        return BLE_HS_EDONE;
+//    }
+//
+//    if (supported_features & 0x01) {
+//        ble_npl_event_set_arg(&g_read_sup_cl_feat_ev, 
UINT_TO_POINTER(conn_handle));
+//        ble_npl_eventq_put(ble_hs_evq_get(), &g_read_sup_cl_feat_ev);
+//    }
+//    return BLE_HS_EDONE;
+//}
+
+//static void
+//ble_gatt_eatt_read_svr_uuid(struct ble_npl_event *ev)
+//{
+//    uint16_t conn_handle;
+//
+//    conn_handle = POINTER_TO_UINT(ble_npl_event_get_arg(ev));
+//
+//    ble_gattc_read_by_uuid(conn_handle, 1, 0xffff,
+//                           
BLE_UUID16_DECLARE(BLE_SVC_GATT_CHR_SERVER_SUPPORTED_FEAT_UUID16),
+//                           ble_gatt_eatt_read_uuid_cb, NULL);
+//}

Review Comment:
   ## Commented-out code
   
   This comment appears to contain commented-out code.
   
   [Show more 
details](https://github.com/apache/mynewt-nimble/security/code-scanning/122)



-- 
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: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to