]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: mqtt: fix spelling of shared_subscription_available
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 15:28:21 +0000 (17:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 15:28:21 +0000 (17:28 +0200)
The struct member 'shared_subsription_available' was misspelled (missing
'c' in 'subscription'). Let's fix it to ease maintenance.

include/haproxy/mqtt-t.h
src/mqtt.c

index 030a29b7447ce8af2ee66356781732d0198d1ed6..019b08459b695e73c6f5683d2b14f9ccf619991d 100644 (file)
@@ -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;
index e90a30574dff825597dda86ee019dc3cb5153034..2cee38b5d290723148e70457da639425afba9f7c 100644 (file)
@@ -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;