Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[1.0.5-rc3] AdvertisedDevice::getServiceDataUUID() excepts when no UUID is present #4596

Copy link
Copy link
Closed
@mkfrey

Description

@mkfrey
Issue body actions

I'm preparing the migration of some of my code from 1.0.4 to 1.0.5 and found that the behaviour of AdvertisedDevice::getServiceDataUUID() has now changed.

I don't know if this is actually a bug, but this new behaviour could lead to some confusion for beginners,
since function calls like this should not throw an exception my opinion. So I'm opening this issue.

In 1.0.4 a call to AdvertisedDevice::getServiceDataUUID() would return the advertised devices member m_serviceDataUUID. If the device did not advertise any service, this would be a BLEUUID created with the default constructor.

As of 1.0.5-rc3, this call returns the first element of the vector m_serviceUUIDs. This vector contains no entries if no UUIDs were advertised, which means that m_serviceUUIDs[0] might throw an exception.

There also seems to be no function for getting the count of advertised UUIDs. This is an issue, because there is no way to determine beforehand whether AdvertisedDevice::getServiceDataUUID() or BLEAdvertisedDevice::getServiceDataUUID(int i) will cause an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)Issue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.