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

Misc refactors involving MQTT5 needed for the MQTT3 adapter #284

Merged
merged 1 commit into from
May 19, 2023

Conversation

bretambrose
Copy link
Contributor

@bretambrose bretambrose commented May 19, 2023

  • Removes const from client config storage so that the adapter's config APIs can mutate values inside
  • Converts the connect packet storage in the MQTT5 client config from by-value to by-pointer. This allows us to more easily swap or mutate binary data within the connect storage.
  • Removes a dangerous and unneeded ref-count acquire/release pair on the mqtt5 client during the websocket handshake transformation process. The mqtt5 client state machine does not allow interruption of the connecting state by the termination process, so there's no need to inc/dec and doing so exposes a race condition that could cause a second termination request.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.03 ⚠️

Comparison is base (16b7c61) 81.20% compared to head (89b75c4) 81.17%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   81.20%   81.17%   -0.03%     
==========================================
  Files          18       18              
  Lines        7311     7311              
==========================================
- Hits         5937     5935       -2     
- Misses       1374     1376       +2     
Impacted Files Coverage Δ
source/v5/mqtt5_client.c 88.34% <100.00%> (-0.02%) ⬇️
source/v5/mqtt5_options_storage.c 90.18% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bretambrose bretambrose merged commit 1941fe0 into main May 19, 2023
31 checks passed
@bretambrose bretambrose deleted the AdapterMqtt5Refactor1 branch May 19, 2023 22:02
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.

None yet

3 participants