From 0fb4e2bf6a87f3202e62ae19007adef2d2a454ba Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 22 Dec 2022 13:21:42 +0000 Subject: [PATCH] Fix incorrect topic-alias property value in mosquitto_sub json output. --- ChangeLog.txt | 4 ++++ client/sub_client_output.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1140dd3b..aa01d5a4 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -6,6 +6,10 @@ Broker: - Fix std* files not being redirected when daemonising, when built with assertions removed. Closes #2708. +Clients: +- Fix incorrect topic-alias property value in mosquitto_sub json output. + + 2.0.15 - 2022-08-16 =================== diff --git a/client/sub_client_output.c b/client/sub_client_output.c index acefa167..8bf7cdb5 100644 --- a/client/sub_client_output.c +++ b/client/sub_client_output.c @@ -210,7 +210,7 @@ static int json_print_properties(cJSON *root, const mosquitto_property *properti break; case MQTT_PROP_TOPIC_ALIAS: - mosquitto_property_read_int16(prop, MQTT_PROP_MESSAGE_EXPIRY_INTERVAL, &i16value, false); + mosquitto_property_read_int16(prop, MQTT_PROP_TOPIC_ALIAS, &i16value, false); tmp = cJSON_CreateNumber(i16value); break;