diff --git a/core/backends/lan/lanpairinghandler.cpp b/core/backends/lan/lanpairinghandler.cpp index 27c06bef5..86bdf4224 100644 --- a/core/backends/lan/lanpairinghandler.cpp +++ b/core/backends/lan/lanpairinghandler.cpp @@ -145,8 +145,10 @@ bool LanPairingHandler::requestPairing() createPairPackage(np); bool success; success = m_deviceLink->sendPackage(np); - if (success) m_pairStatus = PairStatus::Requested; - m_pairingTimeout.start(); + if (success) { + m_pairStatus = PairStatus::Requested; + m_pairingTimeout.start(); + } return success; } diff --git a/tests/lanlinkprovidertest.cpp b/tests/lanlinkprovidertest.cpp index a8c7592cf..10fba977b 100644 --- a/tests/lanlinkprovidertest.cpp +++ b/tests/lanlinkprovidertest.cpp @@ -181,7 +181,7 @@ void LanLinkProviderTest::pairedDeviceUdpPackageReceived() serverSocket->setPeerVerifyMode(QSslSocket::VerifyPeer); serverSocket->setPeerVerifyName(kcc->deviceId()); - serverSocket->startServerEncryption(); // Its TCP server. but SSL client + serverSocket->startClientEncryption(); // Its TCP server. but SSL client QVERIFY(!serverSocket->isEncrypted()); spy3.wait(2000); qDebug() << "xxxxxxxxx" << serverSocket->sslErrors(); @@ -235,7 +235,7 @@ void LanLinkProviderTest::unpairedDeviceTcpPackageReceived() setSocketAttributes(&socket); socket.setPeerVerifyMode(QSslSocket::QueryPeer); - socket.startClientEncryption(); + socket.startServerEncryption(); QVERIFY(spy3.wait());