From a03eb05de28046ae08a3fe04bc1c8a820e6319f7 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Sat, 16 Mar 2019 17:21:32 +0100 Subject: [PATCH] Use struct mqtt_topic for topic names in mqtt_pub example app --- mqtt_pub/mqtt_comm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mqtt_pub/mqtt_comm.c b/mqtt_pub/mqtt_comm.c index 0a7be41..cb6c4af 100644 --- a/mqtt_pub/mqtt_comm.c +++ b/mqtt_pub/mqtt_comm.c @@ -45,11 +45,10 @@ const struct mqtt_connect_pkt mqtt_conn = { .keep_alive_seconds = 600, .clean_session_flag = MQTT_SESSION_RESUME, .client_id = "test", - .will_topic = "will/temp/test", + .will_topic = { .name = "will/temp/test", .QoS = MQTT_QoS_0 }, + .will_retain = 1, .will_msg_size = 4, .will_msg = (uint8_t*)"Bye", - .will_QoS = 0, - .will_retain = 1, .username = "test", .password = "pass", }; @@ -108,8 +107,7 @@ int mqtt_init(int comm_uart, int dbg_uart) struct mqtt_publish_pkt pub_pkt = { - .topic = "temp/test", - .QoS = 1, + .topic = { .name = "temp/test", .QoS = 1, }, .retain_flag = 1, .message_size = sizeof(int), }; -- 2.43.0