Fixed crash when pairing old Android apps.

This commit is contained in:
Albert Vaca 2016-03-02 16:38:03 -08:00
parent ebd429629a
commit 8f9fde8f40
2 changed files with 6 additions and 1 deletions

View file

@ -140,6 +140,11 @@ void LanDeviceLink::userRequestsUnpair()
void LanDeviceLink::setPairStatus(PairStatus status)
{
if (status == Paired && mSocketLineReader->peerCertificate().isNull()) {
Q_EMIT pairingError(i18n("This device can't be paired because is running an old version of KDE Connect."));
return;
}
DeviceLink::setPairStatus(status);
if (status == Paired) {
Q_ASSERT(KdeConnectConfig::instance()->trustedDevices().contains(deviceId()));

View file

@ -235,7 +235,7 @@ void LanLinkProvider::connected()
return; // Return statement prevents from deleting received package, needed in slot "encrypted"
} else {
qWarning() << "Incompatible protocol version, this won't work";
addLink(deviceId, socket, receivedPackage, LanDeviceLink::Remotely);
//addLink(deviceId, socket, receivedPackage, LanDeviceLink::Remotely);
}
} else {