Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid adv payloads are not committed before checking #171

Merged
merged 6 commits into from
Jan 22, 2016

Conversation

andresag01
Copy link

Invalid advertising payloads are no longer committed to the local copy of the advertising and scan payloads in BLE API before the contents are checked by the underlying stack. The Gap member functions changed are:

  • accumulateAdvertisingPayload(flags)
  • accumulateAdvertisingPayload(appearance)
  • accumulateAdvertisingPayloadTxPower(power)
  • accumulateAdvertisingPayload(type, data, length)
  • updateAdvertisingPayload(type, data, length)
  • setAdvertisingPayload(newPayload)
  • accumulateScanResponse(type, data, length)

Furthermore, startAdvertising() no longer sets the payload in the underlying stack because the payload is set every time it is updated. Finally, the shorthand private member setAdvertisingData(void) is removed from Gap as it is redundant.
@pan-

Andres Amaya Garcia added 6 commits January 19, 2016 10:54
Gap function members that modify the advertising and scan payload use the
underlying stack to test if the new payload is sane. If any errors are
generated, then the changes are not committed to copy of the payload in BLE API.
@pan-
Copy link
Member

pan- commented Jan 22, 2016

I'm happy with this

pan- added a commit that referenced this pull request Jan 22, 2016
Invalid adv payloads are not committed before checking
@pan- pan- merged commit 1ff1b5f into ARMmbed:develop Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants