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

Initialise msgParams.isRetained to 0 in publishToShadowAction() #112

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

Rhodri-Davies
Copy link
Contributor

   publishToShadowAction() was violating the MQTT spec by sending publish requests with
   will = 0, and retain = 1, due to msgParams.isRetained not being initialised.

  [MQTT-3.1.2-11]   If the Will Flag is set to 0 the Will QoS and Will Retain fields in the Connect Flags
                               MUST be set to zero and the Will Topic and Will Message fields MUST NOT be
                               present in the payload.

@vareddy-zz
Copy link
Contributor

Hi @Rhodri-Davies ,
Thank you for your pull request! We will merge this fix into master after the next release.
Please let us know if you have any more questions.
Thanks!
Varun

@vareddy-zz vareddy-zz merged commit 9a9f190 into aws:master Dec 19, 2017
gordonwang0 pushed a commit that referenced this pull request Apr 20, 2018
"aws-iot-device-sdk-embedded-C/src/aws_iot_mqtt_client_publish.c", line 353: warning #112-D: statement is unreachable
Using TI 16.9.3LTS compiler, the above message is generated.  The "return rc;" line is redundant as the FUNC_EXIT_RC macro on the line before returns as well.
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.

2 participants