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

Fix publish with topic ID >=127 #351

Merged
merged 1 commit into from Oct 2, 2023
Merged

Conversation

embhorn
Copy link
Member

@embhorn embhorn commented Sep 15, 2023

Fixes zd16708

  • While sending MQTT-SN Publish, if normal topic id is less than or equal to 127, publish is done correctly on the expected topic id.
  • If topic id is equal to or greater than 128, some garbage value is sent in topic ID in publish packet instead of the given topic id. Example, when we try to publish on Normal topic ID 128, Publish is sent on topic ID 65408 instead.

Fixed by proper cast of word16 in SN_Encode_Publish

Also fixes topic_type set in SN_Decode_Publish

@embhorn embhorn self-assigned this Sep 15, 2023
@embhorn embhorn requested a review from lealem47 October 2, 2023 20:26
@lealem47 lealem47 merged commit 9c8985e into wolfSSL:master Oct 2, 2023
8 checks passed
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

2 participants