sample: net: Add initialize for dup_flag when publish
When publish message, the dup_flag is not intialize causing it to have random value and making the AWS MQTT broker to reject the message Add initialize dup_flag as 0 Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
This commit is contained in:
parent
68a92082db
commit
689d1f2ca9
1 changed files with 1 additions and 0 deletions
|
@ -126,6 +126,7 @@ static int publish_message(const char *topic, size_t topic_len, uint8_t *payload
|
|||
struct mqtt_publish_param msg;
|
||||
|
||||
msg.retain_flag = 0u;
|
||||
msg.dup_flag = 0u;
|
||||
msg.message.topic.topic.utf8 = topic;
|
||||
msg.message.topic.topic.size = topic_len;
|
||||
msg.message.topic.qos = CONFIG_AWS_QOS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue