use correct type for service data based on uuid length

pull/8738/head
paul-szczepanek-arm 2018-11-19 15:30:05 +00:00 committed by Vincent Coubard
parent 79518ca089
commit 935444d128
1 changed files with 4 additions and 1 deletions

View File

@ -909,7 +909,10 @@ public:
return BLE_ERROR_INTERNAL_STACK_FAILURE;
}
status = appendData(adv_data_type_t::SERVICE_DATA, data);
status = appendData(
(service.shortOrLong() == UUID::UUID_TYPE_SHORT) ? short_type : long_type,
data
);
if (status != BLE_ERROR_NONE) {
return BLE_ERROR_INTERNAL_STACK_FAILURE;