mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-10 22:08:37 +08:00
added retry to installer for synrgyhk.dll file delete problem, seems to help.
added hack to daemon to suppresses service controller false positive error. tidied up a few of the log lines to make the place look nicer for newbies. removed annoying build line from dist command.
This commit is contained in:
@@ -35,16 +35,16 @@ IpcClient::~IpcClient()
|
||||
|
||||
void IpcClient::connected()
|
||||
{
|
||||
infoMessage("connected to background service");
|
||||
|
||||
char typeBuf[1];
|
||||
typeBuf[0] = kIpcClientGui;
|
||||
write(kIpcHello, 1, typeBuf);
|
||||
|
||||
infoMessage("connection established");
|
||||
}
|
||||
|
||||
void IpcClient::connectToHost()
|
||||
{
|
||||
infoMessage("connecting to background service...");
|
||||
infoMessage("connecting to service...");
|
||||
m_Socket->connectToHost(QHostAddress(QHostAddress::LocalHost), IPC_PORT);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ CEventQueue::adoptBuffer(IEventQueueBuffer* buffer)
|
||||
if (m_events.size() != 0) {
|
||||
// this can come as a nasty surprise to programmers expecting
|
||||
// their events to be raised, only to have them deleted.
|
||||
LOG((CLOG_WARN "discarding %d event(s), sorry", m_events.size()));
|
||||
LOG((CLOG_DEBUG "discarding %d event(s)", m_events.size()));
|
||||
}
|
||||
|
||||
// discard old buffer and old events
|
||||
|
||||
@@ -64,7 +64,7 @@ CIpcServer::handleClientConnecting(const CEvent&, void*)
|
||||
return;
|
||||
}
|
||||
|
||||
LOG((CLOG_NOTE "accepted ipc client connection"));
|
||||
LOG((CLOG_DEBUG "accepted ipc client connection"));
|
||||
|
||||
// TODO: delete on disconnect
|
||||
CIpcClientProxy* proxy = new CIpcClientProxy(*stream);
|
||||
|
||||
@@ -1234,7 +1234,7 @@ CServer::handleShapeChanged(const CEvent&, void* vclient)
|
||||
return;
|
||||
}
|
||||
|
||||
LOG((CLOG_INFO "screen \"%s\" shape changed", getName(client).c_str()));
|
||||
LOG((CLOG_DEBUG "screen \"%s\" shape changed", getName(client).c_str()));
|
||||
|
||||
// update jump coordinate
|
||||
SInt32 x, y;
|
||||
|
||||
@@ -91,6 +91,7 @@ CDaemonApp::~CDaemonApp()
|
||||
int
|
||||
CDaemonApp::run(int argc, char** argv)
|
||||
{
|
||||
bool uninstall = false;
|
||||
try
|
||||
{
|
||||
#if SYSAPI_WIN32
|
||||
@@ -118,6 +119,7 @@ CDaemonApp::run(int argc, char** argv)
|
||||
}
|
||||
#if SYSAPI_WIN32
|
||||
else if (arg == "/install") {
|
||||
uninstall = true;
|
||||
ARCH->installDaemon();
|
||||
return kExitSuccess;
|
||||
}
|
||||
@@ -150,7 +152,17 @@ CDaemonApp::run(int argc, char** argv)
|
||||
return kExitSuccess;
|
||||
}
|
||||
catch (XArch& e) {
|
||||
foregroundError(e.what().c_str());
|
||||
CString message = e.what();
|
||||
if (uninstall && (message.find("The service has not been started") != CString::npos)) {
|
||||
// TODO: if we're keeping this use error code instead (what is it?!).
|
||||
// HACK: this message happens intermittently, not sure where from but
|
||||
// it's quite misleading for the user. they thing something has gone
|
||||
// horribly wrong, but it's just the service manager reporting a false
|
||||
// positive (the service has actually shut down in most cases).
|
||||
}
|
||||
else {
|
||||
foregroundError(message.c_str());
|
||||
}
|
||||
return kExitFailed;
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
@@ -269,7 +281,7 @@ CDaemonApp::logPath()
|
||||
void
|
||||
CDaemonApp::handleIpcConnected(const CEvent& e, void*)
|
||||
{
|
||||
LOG((CLOG_INFO "ipc client connected"));
|
||||
LOG((CLOG_DEBUG "ipc client connected"));
|
||||
EVENTQUEUE->adoptHandler(
|
||||
CIpcClientProxy::getMessageReceivedEvent(), e.getData(),
|
||||
new TMethodEventJob<CDaemonApp>(
|
||||
|
||||
Reference in New Issue
Block a user