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

[SetupPayload] Set TLV buffer to null if there is no optional data #928

Conversation

vivien-apple
Copy link
Contributor

Problem

While fixing #825 with PR #853 it introduced in the code a minimum size for the TLV buffer. Shana points out this is incorrect - but the code got already merged.

This PR fix that by setting not using a TLV buffer at all by default.

Also the change add a reference to the related paragraph of the specification. I have not seen any in the setup_payload code but I would like to add more since I think it would be helpful to match the current behaviour of the code to the related part of the spec.

Summary of Changes

  • Use NULL instead of a buffer if there is no optional data
  • Change the serial number test to use a 1 character serial number (0 got ignore by the underlying Implementation)
  • Remove a leftover TODO

fixes #927

@saurabhst saurabhst merged commit 43cb72c into project-chip:master Jun 1, 2020
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.

[SetupPayload] Set TLV buffer to null if there is no optional data
4 participants