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

Resolve the unclear null apWriter in ReadSingleClusterData #7965

Closed
yunhanw-google opened this issue Jun 28, 2021 · 2 comments
Closed

Resolve the unclear null apWriter in ReadSingleClusterData #7965

yunhanw-google opened this issue Jun 28, 2021 · 2 comments

Comments

@yunhanw-google
Copy link
Contributor

This is still not making sense to me. If the caller does not care about the value, what do they care about? Just whether it exists?

But looking at the ReadSingleClusterData implemetations:

  • The one in TestCommandInteraction.cpp leaves apDataExists unset if apWriter is null.
  • The one in TestReportingEngine.cpp, same thing.
  • The one in chip_im_initiator.cpp, same thing.
  • The one in chip_im_responder.cpp, same thing.
  • The one in ember-compatibility-functions.cpp seems to implement the "just set apDataExists" semantics, ok.

And more to the point: is there ever a caller that actually passes null for apWriter? I don't obviously see one.

Originally posted by @bzbarsky-apple in #7634 (comment)

@stale
Copy link

stale bot commented Jan 26, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Jan 26, 2022
@stale stale bot removed the stale Stale issue or PR label Jan 26, 2022
@bzbarsky-apple
Copy link
Contributor

This is fixed now, since ReadSingleClusterData gets a AttributeReportIBs::Builder and hence always has a TLVWriter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants