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

Separate Rendezvous message handling from BLE session #2418

Merged

Conversation

kpschoedel
Copy link
Contributor

With this change, BLE handling remains in RendezvousSession and
message processing independent of BLE moves to RendervousMessageHandler.

With this change, BLE handling remains in RendezvousSession and
message processing independent of BLE moves to RendervousMessageHandler.
const size_t bufferLen = buffer->DataLength();
char * key = nullptr;
char * ssid = nullptr;
char msg[bufferLen];
Copy link
Contributor

@kedars kedars Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the stack utilisation dependent on the received DataLength. Is the data length known to be capped to a threshold? We could be more deterministic by having the high threshold value in here?

I understand this mostly just moves the existing code into another function, maybe a follow-on then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch; I'm surprised we don't use -Wvla.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please file a followup issue to use -Wvla?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed #2427 proposing -Wvla.

(For this PR, d9dc684 removes the VLA.)

@bzbarsky-apple
Copy link
Contributor

@pan-apple Could you take a look, please?

@pan-apple
Copy link
Contributor

tag: @vivien-apple

@bzbarsky-apple
Copy link
Contributor

@saurabhst @BroderickCarlin @andy31415 could you take a look?

@BroderickCarlin BroderickCarlin merged commit f59dcbc into project-chip:master Sep 8, 2020
@kpschoedel kpschoedel deleted the rendezvous-04-message branch September 28, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants