From bb48a8f8f60ca546808d3b3e3c2b40bc3adf2293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20G=C3=A4hwiler?= Date: Tue, 14 Nov 2017 10:07:12 +0100 Subject: [PATCH] fixed qos flows --- src/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.c b/src/client.c index 6e77f1a..8775ab6 100644 --- a/src/client.c +++ b/src/client.c @@ -223,9 +223,9 @@ static lwmqtt_err_t lwmqtt_cycle(lwmqtt_client_t *client, size_t *read, lwmqtt_p // define ack packet lwmqtt_packet_type_t ack_type = LWMQTT_NO_PACKET; if (msg.qos == LWMQTT_QOS1) { - ack_type = LWMQTT_PUBREC_PACKET; + ack_type = LWMQTT_PUBACK_PACKET; } else if (msg.qos == LWMQTT_QOS2) { - ack_type = LWMQTT_PUBREL_PACKET; + ack_type = LWMQTT_PUBREC_PACKET; } // encode ack packet