Merge branch 'master' into 4696

Conflicts:
	src/gui/src/PluginManager.cpp
This commit is contained in:
Adam Potolsky 2015-05-29 16:39:31 -07:00
commit 1229974d2f
7 changed files with 13 additions and 31 deletions

View File

@ -17,7 +17,7 @@
# Version number for Synergy # Version number for Synergy
set(VERSION_MAJOR 1) set(VERSION_MAJOR 1)
set(VERSION_MINOR 7) set(VERSION_MINOR 7)
set(VERSION_REV 3) set(VERSION_REV 4)
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}") set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}")
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)

View File

@ -37,6 +37,7 @@
#include <UserEnv.h> #include <UserEnv.h>
#include <Shellapi.h> #include <Shellapi.h>
#define MAXIMUM_WAIT_TIME 3
enum { enum {
kOutputBufferSize = 4096 kOutputBufferSize = 4096
}; };
@ -549,8 +550,14 @@ MSWindowsWatchdog::getActiveDesktop(LPSECURITY_ATTRIBUTES security)
} }
ARCH->lockMutex(m_mutex); ARCH->lockMutex(m_mutex);
int waitTime = 0;
while (!m_ready) { while (!m_ready) {
if (waitTime >= MAXIMUM_WAIT_TIME) {
break;
}
ARCH->waitCondVar(m_condVar, m_mutex, 1.0); ARCH->waitCondVar(m_condVar, m_mutex, 1.0);
waitTime++;
} }
m_ready = false; m_ready = false;
ARCH->unlockMutex(m_mutex); ARCH->unlockMutex(m_mutex);
@ -565,7 +572,7 @@ MSWindowsWatchdog::testOutput(String buffer)
if (i != String::npos) { if (i != String::npos) {
size_t s = sizeof(g_activeDesktop); size_t s = sizeof(g_activeDesktop);
String defaultDesktop("Default"); String defaultDesktop("Default");
String sub = buffer.substr(s - 1, defaultDesktop.size()); String sub = buffer.substr(i + s - 1, defaultDesktop.size());
if (sub != defaultDesktop) { if (sub != defaultDesktop) {
m_autoElevated = true; m_autoElevated = true;
} }

View File

@ -64,9 +64,6 @@ public:
//! Get server which owns this listener //! Get server which owns this listener
Server* getServer() { return m_server; } Server* getServer() { return m_server; }
//! Return true if using secure network connection
bool isSecure() { return m_useSecureNetwork; }
//@} //@}
private: private:

View File

@ -29,11 +29,6 @@
// ClientProxy1_6 // ClientProxy1_6
// //
enum
{
kSslClipboardMaxSize = 1024
};
ClientProxy1_6::ClientProxy1_6(const String& name, synergy::IStream* stream, Server* server, IEventQueue* events) : ClientProxy1_6::ClientProxy1_6(const String& name, synergy::IStream* stream, Server* server, IEventQueue* events) :
ClientProxy1_5(name, stream, server, events), ClientProxy1_5(name, stream, server, events),
m_events(events) m_events(events)
@ -62,17 +57,9 @@ ClientProxy1_6::setClipboard(ClipboardID id, const IClipboard* clipboard)
size_t size = data.size(); size_t size = data.size();
LOG((CLOG_DEBUG "sending clipboard %d to \"%s\"", id, getName().c_str())); LOG((CLOG_DEBUG "sending clipboard %d to \"%s\"", id, getName().c_str()));
// HACK: if using SSL, don't send large clipboards (#4601) StreamChunker::sendClipboard(data, size, id, 0, m_events, this);
bool send = true;
if (getServer()->isSecure() && (size > kSslClipboardMaxSize)) {
send = false;
LOG((CLOG_WARN "large clipboards not supported with ssl, size=%d", size));
}
if (send) { LOG((CLOG_DEBUG "sent clipboard size=%d", size));
StreamChunker::sendClipboard(data, size, id, 0, m_events, this);
LOG((CLOG_DEBUG "sent clipboard size=%d", size));
}
} }
} }

View File

@ -2389,9 +2389,3 @@ Server::dragInfoReceived(UInt32 fileNum, String content)
m_screen->startDraggingFiles(m_dragFileList); m_screen->startDraggingFiles(m_dragFileList);
} }
bool
Server::isSecure() const
{
return m_clientListener->isSecure();
}

View File

@ -175,9 +175,6 @@ public:
//! Return received file data //! Return received file data
String& getReceivedFileData() { return m_receivedFileData; } String& getReceivedFileData() { return m_receivedFileData; }
//! Return true if using secure network connection
bool isSecure() const;
//@} //@}
private: private:

View File

@ -63,8 +63,8 @@ ToolApp::run(int argc, char** argv)
return kExitFailed; return kExitFailed;
} }
else { else {
// HACK: send to standard out so watchdog can parse. String output = synergy::string::sprintf("activeDesktop:%s", name.c_str());
std::cout << "activeDesktop:" << name.c_str() << std::endl; LOG((CLOG_INFO "%s", output.c_str()));
} }
#endif #endif
} }