summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-02-17 12:51:41 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-18 16:37:38 +1100
commitcddb90e8b0cd42be9a71e307ab83c6e85afcaf61 (patch)
tree01996ba8ac404112f5c5e750a04cba2b1589c5d6
parent66ac2e1fc0e844686947dad1626c2b43d95e607b (diff)
extmod/modbluetooth_nimble: Fix wrong offset used for descriptor flags.
-rw-r--r--extmod/modbluetooth_nimble.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modbluetooth_nimble.c b/extmod/modbluetooth_nimble.c
index 930dd06d1..903da5a82 100644
--- a/extmod/modbluetooth_nimble.c
+++ b/extmod/modbluetooth_nimble.c
@@ -508,7 +508,7 @@ int mp_bluetooth_gatts_register_service(mp_obj_bluetooth_uuid_t *service_uuid, m
for (size_t j = 0; j < num_descriptors[i]; ++j) {
descriptors[j].uuid = create_nimble_uuid(descriptor_uuids[descriptor_index]);
descriptors[j].access_cb = characteristic_access_cb;
- descriptors[j].att_flags = descriptor_flags[i];
+ descriptors[j].att_flags = descriptor_flags[descriptor_index];
descriptors[j].min_key_size = 0;
// Unlike characteristic, Nimble doesn't provide an automatic way to remember the handle, so use the arg.
descriptors[j].arg = &handles[handle_index];