/* Note: This is not the best behavior for an actual product because uninteresting peers could cause important bonds to be deleted. This is useful for demonstrations and sample apps.  */
int ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
/* Note: This is not the best behavior for an actual product because uninteresting peers could cause important bonds to be deleted. This is useful for demonstrations and sample apps.  */
int ble_store_util_status_rr(struct ble_store_status_event *event, void *arg)
{
    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:
            return ble_gap_unpair_oldest_peer();
        case BLE_STORE_OBJ_TYPE_CCCD:
            return ble_gap_unpair_oldest_except(&event->overflow.value->cccd.peer_addr);
        default:
            return BLE_HS_EUNKNOWN;
        }
    case BLE_STORE_EVENT_FULL:
        return 0;
    default:
        return BLE_HS_EUNKNOWN;
    }
}