Fixed Lan Link Provider Test
Pairing timer was started even when pair package sending is failed, fixed that
This commit is contained in:
parent
67a2c1ffd9
commit
73a80f0296
2 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue