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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12.5, 5.13.1
    • 5.12.0, 5.13.0
    • MQTT
    • None
    • Android, Linux/X11
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mkalinow Maurice Kalinowski
            jirauser24743 user-678dd (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes