Merge branch 'v1.7.4-stable' of https://github.com/synergy/synergy into v1.7.4-stable

This commit is contained in:
Adam Potolsky 2015-06-18 14:19:06 -07:00
commit d51e2e4fb1
12 changed files with 114 additions and 49 deletions

View File

@ -1,3 +1,20 @@
v1.7.4-stable
=============
Bug #4721 - High CPU usage for Windows service on client
Bug #4712 - Unable to send clipboard with size above 1KB when using SSL
Bug #4584 - Drag and drop with SSL causes crash
Bug #3774 - Missing MinGW dependencies after install on Windows
Bug #4749 - Clipboard thread race condition causes assertion failure
Bug #4723 - Waiting for active desktop result freezes Windows service
Bug #4690 - Log line 'activeDesktop' does not use logging system
Bug #4720 - Plugin download shows 'Could not get Linux package type' error
Bug #4737 - Using error log level does not show SSL fingerprint dialog
Enhancement #4696 - Include 'ns' plugin in installers instead of wizard download
Enhancement #4796 - Improve secure socket intensive try operations
Enhancement #4327 - GUI setting to disable drag and drop feature
Enhancement #4745 - Tray icon notification for clipboard data transfer progress
Enhancement #4793 - Additional logging to output OpenSSL version
v1.7.3-stable v1.7.3-stable
============= =============
Bug #4565 - Incorrect plugin downloads on Debian and Mint Bug #4565 - Incorrect plugin downloads on Debian and Mint

View File

@ -491,7 +491,21 @@ Double click on a screen to edit its settings.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QCheckBox" name="m_pCheckBoxIgnoreAutoConfigClient">
<property name="text">
<string>Ignore auto config clients</string>
</property>
</widget>
</item>
<item row="5" column="0"> <item row="5" column="0">
<widget class="QCheckBox" name="m_pCheckBoxEnableDragAndDrop">
<property name="text">
<string>Enable drag and drop file transfers</string>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -504,13 +518,6 @@ Double click on a screen to edit its settings.</string>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="4" column="0">
<widget class="QCheckBox" name="m_pCheckBoxIgnoreAutoConfigClient">
<property name="text">
<string>Ignore auto config clients</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -467,24 +467,26 @@ void MainWindow::checkFingerprint(const QString& line)
void MainWindow::checkTransmission(const QString& line) void MainWindow::checkTransmission(const QString& line)
{ {
if (line.contains("Transmission")) { if (appConfig().logLevel() >= 2) {
if (line.contains("Started")) { if (line.contains("Transmission")) {
setSynergyState(synergyTransfering); if (line.contains("Started")) {
} setSynergyState(synergyTransfering);
else if (line.contains("Failed") || }
line.contains("Complete") || else if (line.contains("Failed") ||
line.contains("Interrupted")) { line.contains("Complete") ||
setSynergyState(synergyConnected); line.contains("Interrupted")) {
} setSynergyState(synergyConnected);
}
// NOTIFY: Title: Detail // NOTIFY: Title: Detail
int p1 = line.indexOf(':'); int p1 = line.indexOf(':');
if (p1 > 0) { if (p1 > 0) {
int p2 = line.indexOf(':', p1 + 1); int p2 = line.indexOf(':', p1 + 1);
if (p2 > 0) { if (p2 > 0) {
QString title = line.mid(p1 + 2, p2 - p1 - 2); QString title = line.mid(p1 + 2, p2 - p1 - 2);
QString detail = line.mid(p2 + 2); QString detail = line.mid(p2 + 2);
m_pTrayIcon->showMessage(title, detail); m_pTrayIcon->showMessage(title, detail);
}
} }
} }
} }
@ -546,7 +548,9 @@ void MainWindow::startSynergy()
#ifndef Q_OS_LINUX #ifndef Q_OS_LINUX
args << "--enable-drag-drop"; if (m_ServerConfig.enableDragAndDrop()) {
args << "--enable-drag-drop";
}
#endif #endif

View File

@ -50,6 +50,7 @@ ServerConfig::ServerConfig(QSettings* settings, int numColumns, int numRows ,
m_NumRows(numRows), m_NumRows(numRows),
m_ServerName(serverName), m_ServerName(serverName),
m_IgnoreAutoConfigClient(false), m_IgnoreAutoConfigClient(false),
m_EnableDragAndDrop(false),
m_pMainWindow(mainWindow) m_pMainWindow(mainWindow)
{ {
Q_ASSERT(m_pSettings); Q_ASSERT(m_pSettings);
@ -114,6 +115,7 @@ void ServerConfig::saveSettings()
settings().setValue("switchDoubleTap", switchDoubleTap()); settings().setValue("switchDoubleTap", switchDoubleTap());
settings().setValue("switchCornerSize", switchCornerSize()); settings().setValue("switchCornerSize", switchCornerSize());
settings().setValue("ignoreAutoConfigClient", ignoreAutoConfigClient()); settings().setValue("ignoreAutoConfigClient", ignoreAutoConfigClient());
settings().setValue("enableDragAndDrop", enableDragAndDrop());
writeSettings(settings(), switchCorners(), "switchCorner"); writeSettings(settings(), switchCorners(), "switchCorner");
@ -157,6 +159,7 @@ void ServerConfig::loadSettings()
setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt()); setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt());
setSwitchCornerSize(settings().value("switchCornerSize").toInt()); setSwitchCornerSize(settings().value("switchCornerSize").toInt());
setIgnoreAutoConfigClient(settings().value("ignoreAutoConfigClient").toBool()); setIgnoreAutoConfigClient(settings().value("ignoreAutoConfigClient").toBool());
setEnableDragAndDrop(settings().value("enableDragAndDrop", true).toBool());
readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners); readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners);

View File

@ -61,6 +61,7 @@ class ServerConfig : public BaseConfig
const QList<bool>& switchCorners() const { return m_SwitchCorners; } const QList<bool>& switchCorners() const { return m_SwitchCorners; }
const HotkeyList& hotkeys() const { return m_Hotkeys; } const HotkeyList& hotkeys() const { return m_Hotkeys; }
bool ignoreAutoConfigClient() const { return m_IgnoreAutoConfigClient; } bool ignoreAutoConfigClient() const { return m_IgnoreAutoConfigClient; }
bool enableDragAndDrop() const { return m_EnableDragAndDrop; }
void saveSettings(); void saveSettings();
void loadSettings(); void loadSettings();
@ -88,6 +89,7 @@ class ServerConfig : public BaseConfig
void setSwitchCorner(int c, bool on) { m_SwitchCorners[c] = on; } void setSwitchCorner(int c, bool on) { m_SwitchCorners[c] = on; }
void setSwitchCornerSize(int val) { m_SwitchCornerSize = val; } void setSwitchCornerSize(int val) { m_SwitchCornerSize = val; }
void setIgnoreAutoConfigClient(bool on) { m_IgnoreAutoConfigClient = on; } void setIgnoreAutoConfigClient(bool on) { m_IgnoreAutoConfigClient = on; }
void setEnableDragAndDrop(bool on) { m_EnableDragAndDrop = on; }
QList<bool>& switchCorners() { return m_SwitchCorners; } QList<bool>& switchCorners() { return m_SwitchCorners; }
HotkeyList& hotkeys() { return m_Hotkeys; } HotkeyList& hotkeys() { return m_Hotkeys; }
@ -119,6 +121,7 @@ class ServerConfig : public BaseConfig
HotkeyList m_Hotkeys; HotkeyList m_Hotkeys;
QString m_ServerName; QString m_ServerName;
bool m_IgnoreAutoConfigClient; bool m_IgnoreAutoConfigClient;
bool m_EnableDragAndDrop;
MainWindow* m_pMainWindow; MainWindow* m_pMainWindow;
}; };

View File

@ -56,6 +56,8 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config, co
m_pCheckBoxIgnoreAutoConfigClient->setChecked(serverConfig().ignoreAutoConfigClient()); m_pCheckBoxIgnoreAutoConfigClient->setChecked(serverConfig().ignoreAutoConfigClient());
m_pCheckBoxEnableDragAndDrop->setChecked(serverConfig().enableDragAndDrop());
foreach(const Hotkey& hotkey, serverConfig().hotkeys()) foreach(const Hotkey& hotkey, serverConfig().hotkeys())
m_pListHotkeys->addItem(hotkey.text()); m_pListHotkeys->addItem(hotkey.text());
@ -97,6 +99,7 @@ void ServerConfigDialog::accept()
serverConfig().setSwitchCorner(BaseConfig::BottomRight, m_pCheckBoxCornerBottomRight->isChecked()); serverConfig().setSwitchCorner(BaseConfig::BottomRight, m_pCheckBoxCornerBottomRight->isChecked());
serverConfig().setSwitchCornerSize(m_pSpinBoxSwitchCornerSize->value()); serverConfig().setSwitchCornerSize(m_pSpinBoxSwitchCornerSize->value());
serverConfig().setIgnoreAutoConfigClient(m_pCheckBoxIgnoreAutoConfigClient->isChecked()); serverConfig().setIgnoreAutoConfigClient(m_pCheckBoxIgnoreAutoConfigClient->isChecked());
serverConfig().setEnableDragAndDrop(m_pCheckBoxEnableDragAndDrop->isChecked());
// now that the dialog has been accepted, copy the new server config to the original one, // now that the dialog has been accepted, copy the new server config to the original one,
// which is a reference to the one in MainWindow. // which is a reference to the one in MainWindow.

View File

@ -273,6 +273,7 @@ Client::leave()
if (m_sendClipboardThread != NULL) { if (m_sendClipboardThread != NULL) {
StreamChunker::interruptClipboard(); StreamChunker::interruptClipboard();
m_sendClipboardThread->wait();
m_sendClipboardThread = NULL; m_sendClipboardThread = NULL;
} }

View File

@ -469,34 +469,47 @@ TCPSocket::serviceConnected(ISocketMultiplexerJob* job,
} }
bool needNewJob = false; bool needNewJob = false;
static UInt32 s_retryOutputBufferSize = 0;
static bool s_retry = false;
static int s_retrySize = 0;
static void* s_staticBuffer = NULL;
if (write) { if (write) {
try { try {
// write data // write data
int buffSize = m_outputBuffer.getSize(); int bufferSize = 0;
int bytesWrote = 0; int bytesWrote = 0;
int status = 0; int status = 0;
if (s_retryOutputBufferSize > 0) { if (s_retry) {
buffSize = s_retryOutputBufferSize; bufferSize = s_retrySize;
} }
else {
bufferSize = m_outputBuffer.getSize();
s_staticBuffer = malloc(bufferSize);
memcpy(s_staticBuffer, m_outputBuffer.peek(bufferSize), bufferSize);
}
const void* buffer = m_outputBuffer.peek(buffSize); if (bufferSize == 0) {
return job;
}
if (isSecure()) { if (isSecure()) {
if (isSecureReady()) { if (isSecureReady()) {
status = secureWrite(buffer, buffSize, bytesWrote); status = secureWrite(s_staticBuffer, bufferSize, bytesWrote);
if (status > 0) { if (status > 0) {
s_retryOutputBufferSize = 0; s_retry = false;
bufferSize = 0;
free(s_staticBuffer);
s_staticBuffer = NULL;
} }
else if (status < 0) { else if (status < 0) {
return NULL; return NULL;
} }
else if (status == 0) { else if (status == 0) {
s_retryOutputBufferSize = buffSize; s_retry = true;
return job; s_retrySize = bufferSize;
return newJob();
} }
} }
else { else {
@ -504,7 +517,10 @@ TCPSocket::serviceConnected(ISocketMultiplexerJob* job,
} }
} }
else { else {
bytesWrote = (UInt32)ARCH->writeSocket(m_socket, buffer, buffSize); bytesWrote = (UInt32)ARCH->writeSocket(m_socket, s_staticBuffer, bufferSize);
bufferSize = 0;
free(s_staticBuffer);
s_staticBuffer = NULL;
} }
// discard written data // discard written data
@ -559,7 +575,7 @@ TCPSocket::serviceConnected(ISocketMultiplexerJob* job,
return NULL; return NULL;
} }
else if (status == 0) { else if (status == 0) {
return job; return newJob();
} }
} }
else { else {

View File

@ -96,6 +96,10 @@ private:
serviceConnected(ISocketMultiplexerJob*, serviceConnected(ISocketMultiplexerJob*,
bool, bool, bool); bool, bool, bool);
protected:
bool m_readable;
bool m_writable;
private: private:
Mutex m_mutex; Mutex m_mutex;
ArchSocket m_socket; ArchSocket m_socket;
@ -103,8 +107,6 @@ private:
StreamBuffer m_outputBuffer; StreamBuffer m_outputBuffer;
CondVar<bool> m_flushed; CondVar<bool> m_flushed;
bool m_connected; bool m_connected;
bool m_readable;
bool m_writable;
IEventQueue* m_events; IEventQueue* m_events;
SocketMultiplexer* m_socketMultiplexer; SocketMultiplexer* m_socketMultiplexer;
}; };

View File

@ -417,14 +417,21 @@ SecureSocket::checkResult(int status, int& retry)
break; break;
case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_READ:
m_readable = true;
retry++;
LOG((CLOG_DEBUG2 "want to read, error=%d, attempt=%d", errorCode, retry));
break;
case SSL_ERROR_WANT_WRITE: case SSL_ERROR_WANT_WRITE:
m_writable = true;
retry++;
LOG((CLOG_DEBUG2 "want to write, error=%d, attempt=%d", errorCode, retry));
break;
case SSL_ERROR_WANT_CONNECT: case SSL_ERROR_WANT_CONNECT:
case SSL_ERROR_WANT_ACCEPT: case SSL_ERROR_WANT_ACCEPT:
// it seems like these sort of errors are part of openssl's normal behavior,
// so we should expect a very high amount of these. sleeping doesn't seem to
// help... maybe you just have to swallow the errors (yuck).
retry++; retry++;
LOG((CLOG_DEBUG2 "passive ssl error, error=%d, attempt=%d", errorCode, retry)); LOG((CLOG_DEBUG2 "want to connect, error=%d, attempt=%d", errorCode, retry));
break; break;
case SSL_ERROR_SYSCALL: case SSL_ERROR_SYSCALL:

View File

@ -509,6 +509,8 @@ Server::switchScreen(BaseClientProxy* dst,
// clipboard data could be corrupted on the other side // clipboard data could be corrupted on the other side
if (m_sendClipboardThread != NULL) { if (m_sendClipboardThread != NULL) {
StreamChunker::interruptClipboard(); StreamChunker::interruptClipboard();
m_sendClipboardThread->wait();
m_sendClipboardThread = NULL;
} }
// send the clipboard data to new active screen // send the clipboard data to new active screen

View File

@ -112,13 +112,13 @@
<fire:FirewallException Id="GuiFirewallException" Name="$(var.Name)" Scope="any" IgnoreFailure="yes" /> <fire:FirewallException Id="GuiFirewallException" Name="$(var.Name)" Scope="any" IgnoreFailure="yes" />
</File> </File>
<File Source="$(var.QtPath)\libgcc_s_dw2-1.dll" CompanionFile="GuiProgram" /> <File Source="$(var.QtPath)\libgcc_s_dw2-1.dll" />
<File Source="$(var.QtPath)\mingwm10.dll" CompanionFile="GuiProgram" /> <File Source="$(var.QtPath)\mingwm10.dll" />
<File Source="$(var.QtPath)\QtCore4.dll" CompanionFile="GuiProgram" /> <File Source="$(var.QtPath)\QtCore4.dll" />
<File Source="$(var.QtPath)\QtGui4.dll" CompanionFile="GuiProgram" /> <File Source="$(var.QtPath)\QtGui4.dll" />
<File Source="$(var.QtPath)\QtNetwork4.dll" CompanionFile="GuiProgram" /> <File Source="$(var.QtPath)\QtNetwork4.dll" />
<File Source="$(var.ExtPath)\bonjour\x64\dnssd.dll" CompanionFile="GuiProgram" /> <File Source="$(var.ExtPath)\bonjour\x64\dnssd.dll" />
</Component> </Component>