Skip to content

Commit 070a412

Browse files
committed
BLE:Cordio:insert_descriptor check r/w properties
1 parent fa65546 commit 070a412

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,10 @@ ble_error_t GattServer::insert_descriptor(
488488
#endif // BLE_FEATURE_SECURE_CONNECTIONS
489489
#endif // BLE_FEATURE_SECURITY
490490
}
491+
492+
if (properties & READ_PROPERTY) {
493+
attribute_it->settings |= ATTS_SET_READ_CBACK;
494+
}
491495
}
492496

493497
// configure write permission
@@ -517,6 +521,10 @@ ble_error_t GattServer::insert_descriptor(
517521
#endif // BLE_FEATURE_SECURE_CONNECTIONS
518522
#endif // BLE_FEATURE_SECURITY
519523
}
524+
525+
if (properties & WRITABLE_PROPERTIES) {
526+
attribute_it->settings |= ATTS_SET_WRITE_CBACK;
527+
}
520528
}
521529

522530
attribute_it++;

0 commit comments

Comments
 (0)