[Libreoffice-commits] online.git: 2 commits - loolwsd/IoUtil.cpp loolwsd/LOOLKit.cpp
Tor Lillqvist
tml at collabora.com
Thu Sep 1 14:19:52 UTC 2016
loolwsd/IoUtil.cpp | 2 +-
loolwsd/LOOLKit.cpp | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
New commits:
commit be4e71c0f0d62d7962396b6242f94e9e7dfc5f57
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Sep 1 17:16:46 2016 +0300
Fix misleading logging
Don't mention 'TerminationFlag' in the log line when that lovely
global variable isn't what we are logging there (but the local 'stop'
boolean variable). Also, output its value as "true" or "false", not
numerically.
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 7b8adfc..868b4ba 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -164,7 +164,7 @@ void SocketProcessor(const std::shared_ptr<WebSocket>& ws,
}
}
- Log::info() << "SocketProcessor finishing. TerminationFlag: " << stop
+ Log::info() << "SocketProcessor finishing. stop: " << (stop ? "true" : "false")
<< ", n: " << n
<< ", payload size: " << payload.size()
<< ", flags: " << std::hex << flags << Log::end;
commit eb4b4b6ca056d2a0221735e3d781a1be18278797
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Sep 1 17:04:02 2016 +0300
Remove leftover unused field Connection::_stop
Not sure what the stop() function should do now, if anything. Maybe
_stop should be kept and actually tested somewhere, like in the third
lambda passed to IoUtil::SocketProcessor() in Connection::run()?
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 84a02f2..0613aa7 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -241,7 +241,6 @@ public:
_sessionId(session->getId()),
_session(std::move(session)),
_ws(std::move(ws)),
- _stop(false),
_joined(false)
{
Log::info("Connection ctor in child for " + _sessionId);
@@ -270,7 +269,7 @@ public:
void stop()
{
- _stop = true;
+ // What should we do here?
}
void join()
@@ -347,7 +346,6 @@ private:
std::shared_ptr<ChildSession> _session;
std::shared_ptr<WebSocket> _ws;
std::mutex _threadMutex;
- std::atomic<bool> _stop;
std::atomic<bool> _joined;
};
More information about the Libreoffice-commits
mailing list