From: Willy Tarreau Date: Mon, 11 May 2026 15:28:21 +0000 (+0200) Subject: CLEANUP: mqtt: fix spelling of shared_subscription_available X-Git-Url: http://www.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=57c3e4b4e2496a1ffa71050da287c28ef3f67cb7;p=haproxy.git CLEANUP: mqtt: fix spelling of shared_subscription_available The struct member 'shared_subsription_available' was misspelled (missing 'c' in 'subscription'). Let's fix it to ease maintenance. --- diff --git a/include/haproxy/mqtt-t.h b/include/haproxy/mqtt-t.h index 030a29b74..019b08459 100644 --- a/include/haproxy/mqtt-t.h +++ b/include/haproxy/mqtt-t.h @@ -278,7 +278,7 @@ struct connack { } user_props[MQTT_PROP_USER_PROPERTY_ENTRIES]; uint8_t wildcard_subscription_available; uint8_t subscription_identifiers_available; - uint8_t shared_subsription_available; + uint8_t shared_subscription_available; uint16_t server_keepalive; struct ist response_information; struct ist server_reference; diff --git a/src/mqtt.c b/src/mqtt.c index e90a30574..2cee38b5d 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -671,7 +671,7 @@ struct ist mqtt_field_value(struct ist msg, int type, int fieldname_id) case MQTT_FN_SHARED_SUBSCRIPTION_AVAILABLE: if (mpkt.data.connack.var_hdr.protocol_version != MQTT_VERSION_5_0) goto not_found_or_invalid; - if (!mqtt_uint2str(trash, mpkt.data.connack.var_hdr.props.shared_subsription_available)) + if (!mqtt_uint2str(trash, mpkt.data.connack.var_hdr.props.shared_subscription_available)) goto not_found_or_invalid; res = ist2(trash->area, trash->data); goto end; @@ -1140,9 +1140,9 @@ static int mqtt_parse_connack(struct ist parser, struct mqtt_pkt *mpkt) case MQTT_PROP_SHARED_SUBSRIPTION_AVAILABLE: if (fields & MQTT_FN_BIT_SHARED_SUBSCRIPTION_AVAILABLE) goto end; - props = mqtt_read_1byte_int(istnext(props), &mpkt->data.connack.var_hdr.props.shared_subsription_available); + props = mqtt_read_1byte_int(istnext(props), &mpkt->data.connack.var_hdr.props.shared_subscription_available); /* can have only 2 values: 0 or 1 */ - if (mpkt->data.connack.var_hdr.props.shared_subsription_available > 1) + if (mpkt->data.connack.var_hdr.props.shared_subscription_available > 1) goto end; fields |= MQTT_FN_BIT_SHARED_SUBSCRIPTION_AVAILABLE; break;