mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-27 22:29:31 +08:00
Comments
This commit is contained in:
@@ -79,6 +79,9 @@ int property__process_will(struct mosquitto *context, struct mosquitto_message_a
|
|||||||
case MQTT_PROP_PAYLOAD_FORMAT_INDICATOR:
|
case MQTT_PROP_PAYLOAD_FORMAT_INDICATOR:
|
||||||
case MQTT_PROP_RESPONSE_TOPIC:
|
case MQTT_PROP_RESPONSE_TOPIC:
|
||||||
case MQTT_PROP_USER_PROPERTY:
|
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){
|
if(msg_properties){
|
||||||
msg_properties_last->next = p;
|
msg_properties_last->next = p;
|
||||||
msg_properties_last = 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 = p;
|
||||||
msg_properties_last = p;
|
msg_properties_last = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* And remove it from *props */
|
||||||
if(p_prev){
|
if(p_prev){
|
||||||
p_prev->next = p->next;
|
p_prev->next = p->next;
|
||||||
p = p_prev->next;
|
p = p_prev->next;
|
||||||
@@ -97,12 +102,14 @@ int property__process_will(struct mosquitto *context, struct mosquitto_message_a
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MQTT_PROP_WILL_DELAY_INTERVAL:
|
case MQTT_PROP_WILL_DELAY_INTERVAL:
|
||||||
|
/* Leave this in *props, to be freed */
|
||||||
context->will_delay_interval = p->value.i32;
|
context->will_delay_interval = p->value.i32;
|
||||||
p_prev = p;
|
p_prev = p;
|
||||||
p = p->next;
|
p = p->next;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MQTT_PROP_MESSAGE_EXPIRY_INTERVAL:
|
case MQTT_PROP_MESSAGE_EXPIRY_INTERVAL:
|
||||||
|
/* Leave this in *props, to be freed */
|
||||||
msg->expiry_interval = p->value.i32;
|
msg->expiry_interval = p->value.i32;
|
||||||
p_prev = p;
|
p_prev = p;
|
||||||
p = p->next;
|
p = p->next;
|
||||||
|
|||||||
Reference in New Issue
Block a user