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

Check QBluetoothSocket::bytesAvailable() implementation

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.0 Beta3
    • Fix Version/s: None
    • Labels:
      None
    • Technical Risk:
      Normal

      Description

      While looking at one of the old QtPositioning bugs (specifically https://bugreports.qt.io/browse/QTBUG-59826) I ended up in QBluetoothSocket sources, and I suspect that there might be some inconsistency and some implementations may report bytesAvailable() > 0 even for a closed socket.
      The bytesAvailable() implementation is:

      return QIODevice::bytesAvailable() + d->bytesAvailable();

      And d->bytesAvailable() might not be cleared properly. At least I suspect that it happens for BlueZ implementation.

      Same may be valid for canReadLine() call.

       

      P.S.: I do not have any possibility to test the behavior on a real device, so this task is just based on reading the source code, and I might be missing something

        Attachments

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

          Activity

            People

            Assignee:
            andreasbuhr Andreas Buhr
            Reporter:
            ivan.solovev Ivan Solovev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes