You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which treats descriptor_list as a Python list. This is bad. Figure out what is wrong.
I have this vague and possibly wrong memory: I think I originally used Python lists, and then decided that I should not do storage allocation in the SD event handlers, and changed to a linked list instead. But clearly this changeover was not done consistently. I think all of these could be linked lists.
The code above is only used for remote Descriptors (it's called in discovery), and the descriptor_list is used as a linked list in common_hal_bleio_characteristic_add_descriptor(), which is for local Descriptors. So perhaps that's this inconsistency is not breaking anything, but it's still not right.
The text was updated successfully, but these errors were encountered:
Service
objects contain a fieldmp_obj_list_t *characteristic_list
, which is meant to be a Python list ofCharacteristic
objects.Characteristic
objects containbleio_descriptor_obj_t *descriptor_list
, which is meant to be a linked list ofDescriptor
objects.Descriptor
objects containstruct _bleio_descriptor_obj* next
, which is used for the linked list.But, there's this code:
circuitpython/ports/nrf/common-hal/_bleio/Connection.c
Line 587 in c754e01
which treats
descriptor_list
as a Python list. This is bad. Figure out what is wrong.I have this vague and possibly wrong memory: I think I originally used Python lists, and then decided that I should not do storage allocation in the SD event handlers, and changed to a linked list instead. But clearly this changeover was not done consistently. I think all of these could be linked lists.
The code above is only used for remote
Descriptors
(it's called in discovery), and thedescriptor_list
is used as a linked list incommon_hal_bleio_characteristic_add_descriptor()
, which is for localDescriptors
. So perhaps that's this inconsistency is not breaking anything, but it's still not right.The text was updated successfully, but these errors were encountered: