From e7f22db4e1dc6faf1d56f9e1d6de5a265a50d2a7 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 24 Mar 2022 13:37:26 +0000 Subject: [PATCH] Comments --- src/property_broker.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/property_broker.c b/src/property_broker.c index fd6ef8e8..ec442d78 100644 --- a/src/property_broker.c +++ b/src/property_broker.c @@ -79,6 +79,9 @@ int property__process_will(struct mosquitto *context, struct mosquitto_message_a case MQTT_PROP_PAYLOAD_FORMAT_INDICATOR: case MQTT_PROP_RESPONSE_TOPIC: case MQTT_PROP_USER_PROPERTY: + /* We save these properties for transmission with the PUBLISH */ + + /* Add this property to the end of the list */ if(msg_properties){ msg_properties_last->next = p; msg_properties_last = p; @@ -86,6 +89,8 @@ int property__process_will(struct mosquitto *context, struct mosquitto_message_a msg_properties = p; msg_properties_last = p; } + + /* And remove it from *props */ if(p_prev){ p_prev->next = p->next; p = p_prev->next; @@ -97,12 +102,14 @@ int property__process_will(struct mosquitto *context, struct mosquitto_message_a break; case MQTT_PROP_WILL_DELAY_INTERVAL: + /* Leave this in *props, to be freed */ context->will_delay_interval = p->value.i32; p_prev = p; p = p->next; break; case MQTT_PROP_MESSAGE_EXPIRY_INTERVAL: + /* Leave this in *props, to be freed */ msg->expiry_interval = p->value.i32; p_prev = p; p = p->next;