diff --git a/src/lib/ipc/CMakeLists.txt b/src/lib/ipc/CMakeLists.txt index 211f80f2..8d505cdf 100644 --- a/src/lib/ipc/CMakeLists.txt +++ b/src/lib/ipc/CMakeLists.txt @@ -56,5 +56,5 @@ include_directories(${inc}) add_library(ipc STATIC ${src}) if (UNIX) - target_link_libraries(arch base common mt io net synergy) + target_link_libraries(ipc arch base common mt io net synergy) endif() diff --git a/src/lib/synergy/CDaemonApp.cpp b/src/lib/synergy/CDaemonApp.cpp index 9b1d0db9..53dfdbbb 100644 --- a/src/lib/synergy/CDaemonApp.cpp +++ b/src/lib/synergy/CDaemonApp.cpp @@ -24,6 +24,13 @@ #include "CLog.h" #include "XArch.h" #include "CApp.h" +#include "TMethodJob.h" +#include "TMethodEventJob.h" +#include "CIpcClientProxy.h" +#include "CIpcMessage.h" +#include "CSocketMultiplexer.h" +#include "CIpcLogOutputter.h" +#include "CLog.h" #include #include @@ -37,13 +44,6 @@ #include "CMSWindowsScreen.h" #include "CMSWindowsRelauncher.h" #include "CMSWindowsDebugOutputter.h" -#include "TMethodJob.h" -#include "TMethodEventJob.h" -#include "CIpcClientProxy.h" -#include "CIpcMessage.h" -#include "CSocketMultiplexer.h" -#include "CIpcLogOutputter.h" -#include "CLog.h" #define WIN32_LEAN_AND_MEAN #include @@ -292,7 +292,7 @@ CDaemonApp::handleIpcMessage(const CEvent& e, void*) switch (m->type()) { case kIpcCommand: { CIpcCommandMessage* cm = static_cast(m); - CString& command = cm->command(); + CString command = cm->command(); LOG((CLOG_DEBUG "got new command: %s", command.c_str())); CString debugArg("--debug"); @@ -321,11 +321,13 @@ CDaemonApp::handleIpcMessage(const CEvent& e, void*) catch (XArch& e) { LOG((CLOG_ERR "failed to save Command setting, %s", e.what().c_str())); } - + +#if SYSAPI_WIN32 // tell the relauncher about the new command. this causes the // relauncher to stop the existing command and start the new // command. m_relauncher->command(command); +#endif break; }