synergy hook DLL will now restart itself if a client tries to

init() it while it's already running.  fixed an uninitialized
pointer bug in CServer and some cleanup-on-error code in
CMSWindowsPrimaryScreen.  also added timeout to read() on
IInputStream and a heartbeat sent by clients so the server
can disconnect clients that are dead but never reset the TCP
connection.  previously the server would keep these dead
clients around forever and if the user was locked on the
client screen for some reason then the server would have to
be rebooted (or the server would have to be killed via a
remote login).
This commit is contained in:
crs
2002-06-26 16:31:48 +00:00
parent d9b2c59d02
commit ed8ed72f26
14 changed files with 169 additions and 63 deletions

View File

@@ -386,21 +386,27 @@ CMSWindowsPrimaryScreen::onOpenDisplay()
// initialize hook library
m_init(m_threadID);
// install the screen saver hook
if (m_installScreenSaver != NULL) {
m_installScreenSaver();
}
try {
// install the screen saver hook
if (m_installScreenSaver != NULL) {
m_installScreenSaver();
}
// get the input desktop and switch to it
if (m_is95Family) {
if (!openDesktop()) {
throw XScreenOpenFailure();
// get the input desktop and switch to it
if (m_is95Family) {
if (!openDesktop()) {
throw XScreenOpenFailure();
}
}
else {
if (!switchDesktop(openInputDesktop())) {
throw XScreenOpenFailure();
}
}
}
else {
if (!switchDesktop(openInputDesktop())) {
throw XScreenOpenFailure();
}
catch (...) {
m_cleanup();
throw;
}
}