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);
|
createPairPackage(np);
|
||||||
bool success;
|
bool success;
|
||||||
success = m_deviceLink->sendPackage(np);
|
success = m_deviceLink->sendPackage(np);
|
||||||
if (success) m_pairStatus = PairStatus::Requested;
|
if (success) {
|
||||||
m_pairingTimeout.start();
|
m_pairStatus = PairStatus::Requested;
|
||||||
|
m_pairingTimeout.start();
|
||||||
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ void LanLinkProviderTest::pairedDeviceUdpPackageReceived()
|
||||||
serverSocket->setPeerVerifyMode(QSslSocket::VerifyPeer);
|
serverSocket->setPeerVerifyMode(QSslSocket::VerifyPeer);
|
||||||
serverSocket->setPeerVerifyName(kcc->deviceId());
|
serverSocket->setPeerVerifyName(kcc->deviceId());
|
||||||
|
|
||||||
serverSocket->startServerEncryption(); // Its TCP server. but SSL client
|
serverSocket->startClientEncryption(); // Its TCP server. but SSL client
|
||||||
QVERIFY(!serverSocket->isEncrypted());
|
QVERIFY(!serverSocket->isEncrypted());
|
||||||
spy3.wait(2000);
|
spy3.wait(2000);
|
||||||
qDebug() << "xxxxxxxxx" << serverSocket->sslErrors();
|
qDebug() << "xxxxxxxxx" << serverSocket->sslErrors();
|
||||||
|
@ -235,7 +235,7 @@ void LanLinkProviderTest::unpairedDeviceTcpPackageReceived()
|
||||||
setSocketAttributes(&socket);
|
setSocketAttributes(&socket);
|
||||||
socket.setPeerVerifyMode(QSslSocket::QueryPeer);
|
socket.setPeerVerifyMode(QSslSocket::QueryPeer);
|
||||||
|
|
||||||
socket.startClientEncryption();
|
socket.startServerEncryption();
|
||||||
|
|
||||||
QVERIFY(spy3.wait());
|
QVERIFY(spy3.wait());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue