rymanluk commented on a change in pull request #790: nimble/store: Fix nimble 
store behavior when CCCDs exceed static defined limit
URL: https://github.com/apache/mynewt-nimble/pull/790#discussion_r402780122
 
 

 ##########
 File path: nimble/host/src/ble_store_util.c
 ##########
 @@ -230,13 +299,35 @@ ble_store_util_delete_oldest_peer(void)
 int
 ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
 {
+    int rc = BLE_HS_EUNKNOWN;
+    ble_addr_t peer_id_addr;
+    int num_peers;
+
     switch (event->event_code) {
     case BLE_STORE_EVENT_OVERFLOW:
         switch (event->overflow.obj_type) {
             case BLE_STORE_OBJ_TYPE_OUR_SEC:
             case BLE_STORE_OBJ_TYPE_PEER_SEC:
             case BLE_STORE_OBJ_TYPE_CCCD:
-                return ble_gap_unpair_oldest_peer();
 
 Review comment:
   I believe that for CCCD we should have different handling and if we want to 
unpair older peer we should not unpair peer for which we store CCCD.  If there 
is nothing to unpair just return the error.
   
   In the CCCD event there is and ble_addr we should use to make sure that one 
is no unpaired.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to