skip incompletely defined, read-only characteristics.
This commit is contained in:
parent
fa3c0990e1
commit
612f3540b0
1 changed files with 7 additions and 0 deletions
|
@ -60,6 +60,13 @@ ble_error_t nRF51GattServer::addService(GattService &service)
|
|||
for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {
|
||||
GattCharacteristic *p_char = service.getCharacteristic(i);
|
||||
|
||||
/* skip any incompletely definied, read-only characteristics. */
|
||||
if ((p_char->getValueAttribute().getValuePtr() == NULL) &&
|
||||
(p_char->getValueAttribute().getInitialLength() == 0) &&
|
||||
(p_char->getProperties() == GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
nordicUUID = custom_convert_to_nordic_uuid(p_char->getValueAttribute().getUUID());
|
||||
|
||||
ASSERT ( ERROR_NONE ==
|
||||
|
|
Loading…
Reference in a new issue