Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-76783

Empty will messages should be allowed (right now they are ignored)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 5.12.0, 5.13.0
    • Fix Version/s: 5.12.5, 5.13.1
    • Component/s: MQTT
    • Labels:
      None
    • Platform/s:
      Android, Linux/X11
    • Commits:
      d25a0abe78648b0e2fbf4ac6d4e3b325e88dfb42

      Description

      Right now, QMqttConnection contains code like this (2 locations):

      {{m_clientPrivate->m_willMessage.isEmpty() }}

      I might be misinterpreting the spec, but:

      http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html

      3.1.3.3 Will Message
      The Will Message defines the Application Message that is to be published to the Will Topic as described in Section 3.1.2.5. This field consists of a two byte length followed by the payload for the Will Message expressed as a sequence of zero or more bytes.

      3.3.3 Payload
      It is valid for a PUBLISH Packet to contain a zero length payload.

       

      I think both a regular message as well as a will message can be of zero length, i.e. 'empty'.

      Right now, the code ignores empty will messages, these are not send/registered.

      The usecase for an empty will message is clearing an earlier set retained message, since clearing a retained message is done by posting an empty one.

        Attachments

        For Gerrit Dashboard: QTBUG-76783
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            mkalinow Maurice Kalinowski
            Reporter:
            mr.gadgets Frank van Vugt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes