added enable crypto argument to synergys/c #4313

This commit is contained in:
XinyuHou 2015-02-12 15:50:08 +00:00
parent bbcca144f5
commit c4c0fc8a08
24 changed files with 106 additions and 66 deletions

View file

@ -60,7 +60,8 @@ Client::Client(
const String& name, const NetworkAddress& address,
ISocketFactory* socketFactory,
synergy::Screen* screen,
bool enableDragDrop) :
bool enableDragDrop,
bool enableCrypto) :
m_mock(false),
m_name(name),
m_serverAddress(address),
@ -103,6 +104,13 @@ Client::Client(
new TMethodEventJob<Client>(this,
&Client::handleFileRecieveCompleted));
}
if (enableCrypto) {
m_useSecureNetwork = ARCH->plugin().exists(s_networkSecurity);
if (m_useSecureNetwork == false) {
LOG((CLOG_NOTE "crypto disabled because of ns plugin not available"));
}
}
}
Client::~Client()
@ -152,7 +160,6 @@ Client::connect()
}
// create the socket
m_useSecureNetwork = ARCH->plugin().exists(s_networkSecurity);
IDataSocket* socket = m_socketFactory->create(m_useSecureNetwork);
m_socket = dynamic_cast<TCPSocket*>(socket);