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

BlackBerry: QBluetoothServer and related code has bugs (based on code inspection)

    XMLWordPrintable

    Details

    • Commits:
      I452651266192e5773b8330e5f7c02885adff2279 Change-Id: I96b1ae87254a772008b18a662faa7bc2bd84164b

      Description

      The following issues where found based on code inspections in qbluetoothserver_qnx.cpp

      1.) d->socket leaks memory if the user calls QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port) multiple times in a row.

      2.) Calling QBluetoothServer::close() should not cause error if d->socket is not defined. The code should simply do nothing in such a case

      3.) d->activeSockets is never reset. If the user closes the socket it should close any pending and not yet collected active sockets.

      4.) maxPendingConnections should not be ignored. The implementation should reject incoming sockets if max is reached. Presumably d->activeSockets should assist during the implementation.

      5.) QBluetoothServiceInfo::isRegistered() returns false after construction but once registerService() was called it will always return true. A call to unregisterService() should reset the value.

      6.) Calling QBluetoothServer::listen() multiple times in a row, with a default port of 0, will add the QBluetoothServerPrivate instance multiple times to fakeServerPorts hash. Calling close() should remove the instance from the has map.

        Attachments

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

          Activity

            People

            Assignee:
            nedo99 Nedim Hadzic
            Reporter:
            ablasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes