Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
1.2.0
-
None
-
60d476e615c7c7c248259f91cc0a690961da3f66
Description
Some problem found during the code review need to be fixed:
qbluetoothsocket_symbian.cpp and qbluetoothsocket_p.h:
. No need for iBlankSocket -> removed from code
. QBluetoothSocketPrivate::connectToService():
-> not checking is address is null -> corrected
-> Q_unused openmode.
-> No trap for TBTDevAddr constructor
. QBluetoothSocketPrivate::ensureNativeSocket
-> delete isocket need to be followed by isocket = 0
-> commestic changes -> added else statement for return value at the end of the function.
-> removed return false statement from default branch since it is useless.
. QBluetoothSocketPrivate::ensureBlankNativeSocket
-> return true or false -> follow the same logic than ensureNativeSocket.
-> we could use ensureNativeSocket instead but this may not work like expected
. Removed void startServerSideReceive();
. Enabled automatic sniff mode.
. "receiving" member removed, a better solution is to cancel receiving just before initiating receiving again.
. QBluetoothSocketPrivate::startReceive:
-> Added error and state checking
. QBluetoothSocketPrivate::receive:
-> trap descriptor set() function which may panic
-> added state and error checking
. QBluetoothSocketPrivate::HandleAcceptCompleteL:
-> Emit connected only if there is no errors.
-> Missing change to connected state
. QBluetoothSocketPrivate::HandleActivateBasebandEventNotifierCompleteL:
-> added error handling which was missing even if the function doesn't seems to be used currently.
. QBluetoothSocketPrivate::HandleIoctlCompleteL:
-> same as above.
. QBluetoothSocketPrivate::HandleReceiveCompleteL:
-> Unlike in Unix socket cases a read that return no error but 0 data cannot be considered like the socket is closed.
-> checking bufPtr is correct.
. QBluetoothSocketPrivate::HandleShutdownCompleteL:
-> The socket is considered closed regardless the value of aErr.
-> iSocket is delected asynchronously here.
. QBluetoothSocketPrivate::localAddress:
-> added check for iSocket, if not found return empty QBluetoothAddress and emit error.
. QBluetoothSocketPrivate::peerAddress:
-> same as above.
. QBluetoothSocketPrivate::localPort:
-> Same as above.
. QBluetoothSocketPrivate::close:
-> Same as above.
. QBluetoothSocketPrivate::abort:
-> Same as above.
. QBluetoothSocketPrivate::peerName:
-> Added check for socket server and iSocket.
. QBluetoothSocketPrivate::writeData:
-> error handling significantly improved.
. QBluetoothSocketPrivate::setSocketDescriptor:
-> parameters Q_UNUSED
. QBluetoothSocketPrivate::bytesAvailable:
-> return buffer.size() instead of rxDescriptor.Length().
. QBluetoothSocketPrivate::tryToSend:
-> function added to handle internal buffering.
. Added handling of baseband events for link error and link down events -> emit disconnect
utils_symbian_p.h:
. qTBTDevAddrToQBluetoothAddress
-> Added length of descriptor check to avoid a panic.
ql2capserver_symbian.cpp ql2capserver_p.h:
. QL2capServerPrivate::QL2capServerPrivate():
-> added initialization of socket to 0
-> moved socket creation in listen function.
. QL2capServer::listen:
-> Added socket creation there
-> added socket checking
-> added check address is not null
-> added authentication when encryption is requested.
-> added support for QBluetooth::Secure for cross platform compatibility
-> added support for BT2.1 -> use of man-in-the-middle protection level set to "desired"
-> pending socket created are added immediatly to the active socket list
. QL2capServer::nextPendingConnection
-> no need to enable receiving it is done automatically in socket HandleAcceptCompleteL function.
. Slots connected, socketError and disconnected added -> replace the MBluetoothSocketNotifier -> this is more consistant with the design