diff --git a/common/slipdataprocessor.cpp b/common/slipdataprocessor.cpp index ca47435..91e9d10 100644 --- a/common/slipdataprocessor.cpp +++ b/common/slipdataprocessor.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/common/slipdataprocessor.h b/common/slipdataprocessor.h index 9e848f8..56c1c65 100644 --- a/common/slipdataprocessor.h +++ b/common/slipdataprocessor.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.cpp b/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.cpp index 24e8ca1..223ce72 100644 --- a/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.cpp +++ b/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.h b/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.h index 518340f..707e030 100644 --- a/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.h +++ b/libnymea-remoteproxy/jsonrpc/tunnelproxyhandler.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/loggingcategories.cpp b/libnymea-remoteproxy/loggingcategories.cpp index 4db02c1..beefc73 100644 --- a/libnymea-remoteproxy/loggingcategories.cpp +++ b/libnymea-remoteproxy/loggingcategories.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/loggingcategories.h b/libnymea-remoteproxy/loggingcategories.h index ea7b3ac..0308fc0 100644 --- a/libnymea-remoteproxy/loggingcategories.h +++ b/libnymea-remoteproxy/loggingcategories.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/proxy/proxyclient.cpp b/libnymea-remoteproxy/proxy/proxyclient.cpp index 0971e9a..1731d25 100644 --- a/libnymea-remoteproxy/proxy/proxyclient.cpp +++ b/libnymea-remoteproxy/proxy/proxyclient.cpp @@ -115,11 +115,9 @@ void ProxyClient::resetTimer() { switch (m_timerWaitState) { case TimerWaitStateInactive: - m_timer->stop(); m_timer->start(Engine::instance()->configuration()->inactiveTimeout()); break; case TimerWaitStateAlone: - m_timer->stop(); m_timer->start(Engine::instance()->configuration()->aloneTimeout()); break; } @@ -137,7 +135,7 @@ QList ProxyClient::processData(const QByteArray &data) m_dataBuffer = m_dataBuffer.right(m_dataBuffer.length() - splitIndex - 2); splitIndex = m_dataBuffer.indexOf("}\n{"); } - if (m_dataBuffer.trimmed().endsWith("}")) { + if (m_dataBuffer.endsWith("}\n") || m_dataBuffer.endsWith("}")) { packets.append(m_dataBuffer); m_dataBuffer.clear(); } diff --git a/libnymea-remoteproxy/proxy/proxyserver.cpp b/libnymea-remoteproxy/proxy/proxyserver.cpp index 228687e..42274b5 100644 --- a/libnymea-remoteproxy/proxy/proxyserver.cpp +++ b/libnymea-remoteproxy/proxy/proxyserver.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -381,10 +381,10 @@ void ProxyServer::onProxyClientTimeoutOccurred() qCDebug(dcProxyServer()) << "Timeout occurred for" << proxyClient; switch (proxyClient->timerWaitState()) { case ProxyClient::TimerWaitStateInactive: - proxyClient->killConnection("Proxy timeout occuret. The socket was inactive."); + proxyClient->killConnection("Proxy timeout occurred. The socket was inactive."); break; case ProxyClient::TimerWaitStateAlone: - proxyClient->killConnection("Proxy timeout occuret. The tunnel partner did not show up."); + proxyClient->killConnection("Proxy timeout occurred. The tunnel partner did not show up."); break; } } diff --git a/libnymea-remoteproxy/server/tcpsocketserver.h b/libnymea-remoteproxy/server/tcpsocketserver.h index b19352a..7cc32c5 100644 --- a/libnymea-remoteproxy/server/tcpsocketserver.h +++ b/libnymea-remoteproxy/server/tcpsocketserver.h @@ -81,7 +81,7 @@ private: bool m_sslEnabled; QSslConfiguration m_sslConfiguration; - QHash m_clientList; + QHash m_clientList; SslServer *m_server = nullptr; diff --git a/libnymea-remoteproxy/server/transportclient.cpp b/libnymea-remoteproxy/server/transportclient.cpp index 9fd42f2..571456f 100644 --- a/libnymea-remoteproxy/server/transportclient.cpp +++ b/libnymea-remoteproxy/server/transportclient.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/server/transportclient.h b/libnymea-remoteproxy/server/transportclient.h index 5426bfe..5146afe 100644 --- a/libnymea-remoteproxy/server/transportclient.h +++ b/libnymea-remoteproxy/server/transportclient.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/server/websocketserver.cpp b/libnymea-remoteproxy/server/websocketserver.cpp index 8f55ed5..63ab552 100644 --- a/libnymea-remoteproxy/server/websocketserver.cpp +++ b/libnymea-remoteproxy/server/websocketserver.cpp @@ -86,7 +86,7 @@ void WebSocketServer::onClientConnected() // Got a new client connected QWebSocket *client = m_server->nextPendingConnection(); if (!client) { - qCWarning(dcWebSocketServer()) << "Next pending connection dissapeared. Doing nothing."; + qCWarning(dcWebSocketServer()) << "Next pending connection disappeared. Doing nothing."; return; } @@ -147,7 +147,7 @@ void WebSocketServer::onClientError(QAbstractSocket::SocketError error) QWebSocket *client = static_cast(sender()); qCWarning(dcWebSocketServer()) << "Client error occurred:" << client << client->peerAddress().toString() << error << client->errorString() << "Closing the socket."; - // Note: on any error which can occure, make sure the socket will be closed in any case + // Note: on any error which can occurre, make sure the socket will be closed in any case client->close(); } @@ -199,7 +199,7 @@ bool WebSocketServer::stopServer() if (!m_server) return true; - qCDebug(dcWebSocketServer()) << "Stop server" << m_server->serverName() << serverUrl().toString(); + qCDebug(dcWebSocketServer()) << "Stopping server" << m_server->serverName() << serverUrl().toString(); m_server->close(); delete m_server; m_server = nullptr; diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclient.cpp b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclient.cpp index 710fdab..f9bb7fb 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclient.cpp +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclient.cpp @@ -60,7 +60,7 @@ QList TunnelProxyClient::processData(const QByteArray &data) m_dataBuffer = m_dataBuffer.right(m_dataBuffer.length() - splitIndex - 2); splitIndex = m_dataBuffer.indexOf("}\n{"); } - if (m_dataBuffer.trimmed().endsWith("}")) { + if (m_dataBuffer.endsWith("}\n") || m_dataBuffer.endsWith("}")) { packets.append(m_dataBuffer); m_dataBuffer.clear(); } diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.cpp b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.cpp index 35739d3..21c529c 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.cpp +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.h b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.h index fbbb986..b1414a0 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.h +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyclientconnection.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.cpp b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.cpp index 7c434b4..54d6613 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.cpp +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.h b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.h index 14188ed..c03febc 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.h +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserver.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.cpp b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.cpp index 83b4dd8..f9addae 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.cpp +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.h b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.h index 471eb5a..1366faa 100644 --- a/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.h +++ b/libnymea-remoteproxy/tunnelproxy/tunnelproxyserverconnection.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/proxyjsonrpcclient.cpp b/libnymea-remoteproxyclient/proxyjsonrpcclient.cpp index 889f59e..e80bfb5 100644 --- a/libnymea-remoteproxyclient/proxyjsonrpcclient.cpp +++ b/libnymea-remoteproxyclient/proxyjsonrpcclient.cpp @@ -200,7 +200,7 @@ void JsonRpcClient::processData(const QByteArray &data) m_dataBuffer = m_dataBuffer.right(m_dataBuffer.length() - splitIndex - 2); splitIndex = m_dataBuffer.indexOf("}\n{"); } - if (m_dataBuffer.trimmed().endsWith("}")) { + if (m_dataBuffer.endsWith("}\n") || m_dataBuffer.endsWith("}")) { processDataPacket(m_dataBuffer); m_dataBuffer.clear(); } diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp index 0a21ff3..42cdacb 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.h b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.h index e550ba9..0db93b8 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.h +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxyremoteconnection.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.cpp b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.cpp index 0da45c0..4aff722 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.cpp +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.h b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.h index 58bc005..5a9d808 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.h +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocket.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.cpp b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.cpp index 903f702..2aebc91 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.cpp +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.h b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.h index bcb397d..ab9fe3a 100644 --- a/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.h +++ b/libnymea-remoteproxyclient/tunnelproxy/tunnelproxysocketserver.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/tests/test-proxy/remoteproxytestsproxy.cpp b/tests/test-proxy/remoteproxytestsproxy.cpp index 435595c..bbd274f 100644 --- a/tests/test-proxy/remoteproxytestsproxy.cpp +++ b/tests/test-proxy/remoteproxytestsproxy.cpp @@ -129,14 +129,14 @@ void RemoteProxyTestsProxy::monitorServer() // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - QVERIFY(connectionOne->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionOne->connectServer(m_serverUrlProxyTcp)); connectionOneReadySpy.wait(); QVERIFY(connectionOneReadySpy.count() == 1); QVERIFY(connectionOne->isConnected()); // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - QVERIFY(connectionTwo->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionTwo->connectServer(m_serverUrlProxyTcp)); connectionTwoReadySpy.wait(); QVERIFY(connectionTwoReadySpy.count() == 1); QVERIFY(connectionTwo->isConnected()); @@ -598,14 +598,14 @@ void RemoteProxyTestsProxy::authenticateNonce() // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - QVERIFY(connectionOne->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionOne->connectServer(m_serverUrlProxyTcp)); connectionOneReadySpy.wait(); QVERIFY(connectionOneReadySpy.count() == 1); QVERIFY(connectionOne->isConnected()); // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - QVERIFY(connectionTwo->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionTwo->connectServer(m_serverUrlProxyTcp)); connectionTwoReadySpy.wait(); QVERIFY(connectionTwoReadySpy.count() == 1); QVERIFY(connectionTwo->isConnected()); @@ -720,7 +720,7 @@ void RemoteProxyTestsProxy::clientConnectionWebSocket() m_mockAuthenticator->setExpectedAuthenticationError(); // Connect to the server using WebSocket (insecure disabled) - RemoteProxyConnection *connection = new RemoteProxyConnection(QUuid::createUuid(), "Test client one", this); + RemoteProxyConnection *connection = new RemoteProxyConnection(QUuid::createUuid(), "Test client one", RemoteProxyConnection::ConnectionTypeWebSocket, this); connect(connection, &RemoteProxyConnection::sslErrors, this, &BaseTest::ignoreConnectionSslError); // Connect to server (insecue enabled for testing) @@ -837,14 +837,14 @@ void RemoteProxyTestsProxy::remoteConnection() // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - QVERIFY(connectionOne->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionOne->connectServer(m_serverUrlProxyTcp)); connectionOneReadySpy.wait(); QVERIFY(connectionOneReadySpy.count() == 1); QVERIFY(connectionOne->isConnected()); // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - QVERIFY(connectionTwo->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionTwo->connectServer(m_serverUrlProxyTcp)); connectionTwoReadySpy.wait(); QVERIFY(connectionTwoReadySpy.count() == 1); QVERIFY(connectionTwo->isConnected()); @@ -956,14 +956,14 @@ void RemoteProxyTestsProxy::trippleConnection() // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - QVERIFY(connectionOne->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionOne->connectServer(m_serverUrlProxyTcp)); connectionOneReadySpy.wait(); QVERIFY(connectionOneReadySpy.count() == 1); QVERIFY(connectionOne->isConnected()); // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - QVERIFY(connectionTwo->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionTwo->connectServer(m_serverUrlProxyTcp)); connectionTwoReadySpy.wait(); QVERIFY(connectionTwoReadySpy.count() == 1); QVERIFY(connectionTwo->isConnected()); @@ -996,7 +996,7 @@ void RemoteProxyTestsProxy::trippleConnection() // Connect three QSignalSpy connectionThreeReadySpy(connectionThree, &RemoteProxyConnection::ready); QSignalSpy connectionThreeDisconnectedSpy(connectionThree, &RemoteProxyConnection::disconnected); - QVERIFY(connectionThree->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionThree->connectServer(m_serverUrlProxyTcp)); connectionThreeReadySpy.wait(); QVERIFY(connectionThreeReadySpy.count() == 1); QVERIFY(connectionThree->isConnected()); @@ -1041,14 +1041,14 @@ void RemoteProxyTestsProxy::duplicateUuid() // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - QVERIFY(connectionOne->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionOne->connectServer(m_serverUrlProxyTcp)); connectionOneReadySpy.wait(); QVERIFY(connectionOneReadySpy.count() == 1); QVERIFY(connectionOne->isConnected()); // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - QVERIFY(connectionTwo->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connectionTwo->connectServer(m_serverUrlProxyTcp)); connectionTwoReadySpy.wait(); QVERIFY(connectionTwoReadySpy.count() == 1); QVERIFY(connectionTwo->isConnected()); @@ -1088,7 +1088,7 @@ void RemoteProxyTestsProxy::sslConfigurations() // Connect to the server (insecure disabled) RemoteProxyConnection *connector = new RemoteProxyConnection(QUuid::createUuid(), "Test client one", this); QSignalSpy spyError(connector, &RemoteProxyConnection::errorOccurred); - QVERIFY(connector->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connector->connectServer(m_serverUrlProxyTcp)); spyError.wait(); QVERIFY(spyError.count() == 1); qDebug() << connector->error(); @@ -1098,7 +1098,7 @@ void RemoteProxyTestsProxy::sslConfigurations() // Connect to server (insecue enabled) QSignalSpy spyConnected(connector, &RemoteProxyConnection::connected); connect(connector, &RemoteProxyConnection::sslErrors, this, &BaseTest::ignoreConnectionSslError); - connector->connectServer(m_serverUrlProxyWebSocket); + connector->connectServer(m_serverUrlProxyTcp); spyConnected.wait(); QVERIFY(connector->isConnected()); @@ -1153,7 +1153,7 @@ void RemoteProxyTestsProxy::inactiveTimeout() // Connect one QSignalSpy connectionReadySpy(connection, &RemoteProxyConnection::ready); QSignalSpy connectionDisconnectedSpy(connection, &RemoteProxyConnection::disconnected); - QVERIFY(connection->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connection->connectServer(m_serverUrlProxyTcp)); connectionReadySpy.wait(); QVERIFY(connectionReadySpy.count() == 1); @@ -1210,7 +1210,7 @@ void RemoteProxyTestsProxy::authenticationReplyConnection() // Connect one QSignalSpy connectionReadySpy(connection, &RemoteProxyConnection::ready); - QVERIFY(connection->connectServer(m_serverUrlProxyWebSocket)); + QVERIFY(connection->connectServer(m_serverUrlProxyTcp)); connectionReadySpy.wait(); QVERIFY(connectionReadySpy.count() == 1); diff --git a/tests/test-tunnelproxy/remoteproxyteststunnelproxy.cpp b/tests/test-tunnelproxy/remoteproxyteststunnelproxy.cpp index f714f38..7185a0a 100644 --- a/tests/test-tunnelproxy/remoteproxyteststunnelproxy.cpp +++ b/tests/test-tunnelproxy/remoteproxyteststunnelproxy.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/tests/test-tunnelproxy/remoteproxyteststunnelproxy.h b/tests/test-tunnelproxy/remoteproxyteststunnelproxy.h index cba9b28..5512289 100644 --- a/tests/test-tunnelproxy/remoteproxyteststunnelproxy.h +++ b/tests/test-tunnelproxy/remoteproxyteststunnelproxy.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2021, nymea GmbH +* Copyright 2013 - 2022, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. diff --git a/tests/testbase/basetest.cpp b/tests/testbase/basetest.cpp index e5c2b80..eea50b8 100644 --- a/tests/testbase/basetest.cpp +++ b/tests/testbase/basetest.cpp @@ -326,7 +326,7 @@ bool BaseTest::createRemoteConnection(const QString &token, const QString &nonce // Connect one QSignalSpy connectionOneReadySpy(connectionOne, &RemoteProxyConnection::ready); - if (!connectionOne->connectServer(m_serverUrlProxyWebSocket)) { + if (!connectionOne->connectServer(m_serverUrlProxyTcp)) { qWarning() << "Could not connect client one"; return false; } @@ -344,7 +344,7 @@ bool BaseTest::createRemoteConnection(const QString &token, const QString &nonce // Connect two QSignalSpy connectionTwoReadySpy(connectionTwo, &RemoteProxyConnection::ready); - if (!connectionTwo->connectServer(m_serverUrlProxyWebSocket)) { + if (!connectionTwo->connectServer(m_serverUrlProxyTcp)) { qWarning() << "Could not connect client two"; return false; }