[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:29:50 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=91c23df
The following commit has been merged in the master branch:
commit 91c23dfdead8862d056f1b32f1b139690e4eb260
Author: Albert Vaca <albertvaka at gmail.com>
Date: Thu Jun 16 19:47:52 2016 +0200
Do not compare against the current version of the protocol
---
core/backends/lan/lanlinkprovider.cpp | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp
index 1d3063a..42ef359 100644
--- a/core/backends/lan/lanlinkprovider.cpp
+++ b/core/backends/lan/lanlinkprovider.cpp
@@ -43,6 +43,8 @@
#include <QtNetwork/qsslcipher.h>
#include <QtNetwork/qsslconfiguration.h>
+#define MIN_VERSION_WITH_SSL_SUPPORT 6
+
LanLinkProvider::LanLinkProvider(bool testMode)
: mTestMode(testMode)
{
@@ -226,7 +228,7 @@ void LanLinkProvider::connected()
qCDebug(KDECONNECT_CORE) << "Handshaking done (i'm the existing device)";
// if ssl supported
- if (receivedPackage->get<int>("protocolVersion") >= NetworkPackage::ProtocolVersion) {
+ if (receivedPackage->get<int>("protocolVersion") >= MIN_VERSION_WITH_SSL_SUPPORT) {
// since I support ssl and remote device support ssl
socket->setPeerVerifyName(deviceId);
@@ -249,7 +251,7 @@ void LanLinkProvider::connected()
socket->startServerEncryption();
return; // Return statement prevents from deleting received package, needed in slot "encrypted"
} else {
- qWarning() << "Incompatible protocol version, this won't work";
+ qWarning() << receivedPackage->get<QString>("deviceName") << "uses an old protocol version, this won't work";
//addLink(deviceId, socket, receivedPackage, LanDeviceLink::Remotely);
}
@@ -275,7 +277,6 @@ void LanLinkProvider::encrypted()
NetworkPackage* receivedPackage = receivedIdentityPackages[socket].np;
const QString& deviceId = receivedPackage->get<QString>("deviceId");
- //qCDebug(KDECONNECT_CORE) << "Connected" << socket->isWritable();
addLink(deviceId, socket, receivedPackage, LanDeviceLink::Remotely);
@@ -376,7 +377,7 @@ void LanLinkProvider::dataReceived()
//This socket will now be owned by the LanDeviceLink or we don't want more data to be received, forget about it
disconnect(socket, SIGNAL(readyRead()), this, SLOT(dataReceived()));
- if (NetworkPackage::ProtocolVersion <= np->get<int>("protocolVersion")) {
+ if (np->get<int>("protocolVersion") >= MIN_VERSION_WITH_SSL_SUPPORT) {
// since I support ssl and remote device support ssl
bool isDeviceTrusted = KdeConnectConfig::instance()->trustedDevices().contains(deviceId);
@@ -400,7 +401,7 @@ void LanLinkProvider::dataReceived()
socket->startClientEncryption();
} else {
- qWarning() << "Incompatible protocol version, this won't work";
+ qWarning() << np->get<QString>("deviceName") << "uses an old protocol version, this won't work";
//addLink(deviceId, socket, np, LanDeviceLink::Locally);
delete receivedIdentityPackages.take(socket).np;
}
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list