[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/MasterProcessSession.cpp loolwsd/MasterProcessSession.hpp
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 25 16:11:41 UTC 2016
loolwsd/LOOLWSD.cpp | 14 +++++++-------
loolwsd/MasterProcessSession.cpp | 6 +++---
loolwsd/MasterProcessSession.hpp | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 08b52fae72a7794b75d30f6bd4a9225199abd2c3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 25 17:10:16 2016 +0100
MasterProcessSession: fix missing prefixes
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index ea745ca..7412124 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -614,7 +614,7 @@ private:
// The fix is to push everything into the queue
// (i.e. change MessageQueue to vector<char>).
const std::string firstLine = getFirstLine(data, size);
- time(&session->lastMessageTime);
+ time(&session->_lastMessageTime);
if (singleLine || firstLine.find("paste") == 0)
{
if (firstLine.compare(0, 10, "disconnect") == 0) // starts with "disconnect"
@@ -1453,13 +1453,13 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
std::unique_lock<std::mutex> sessionsLock(sessionsMutex);
for (auto& it : sessions)
{
- if (it->lastMessageTime > it->idleSaveTime &&
- it->lastMessageTime < now - 30)
+ if (it->_lastMessageTime > it->_idleSaveTime &&
+ it->_lastMessageTime < now - 30)
{
// Trigger a .uno:Save
Log::info("Idle save triggered for session " + it->getId());
- it->idleSaveTime = now;
+ it->_idleSaveTime = now;
}
}
}
@@ -1471,13 +1471,13 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
std::unique_lock<std::mutex> sessionsLock(sessionsMutex);
for (auto& it : sessions)
{
- if (it->lastMessageTime >= it->idleSaveTime &&
- it->lastMessageTime >= it->autoSaveTime)
+ if (it->_lastMessageTime >= it->_idleSaveTime &&
+ it->_lastMessageTime >= it->_autoSaveTime)
{
// Trigger a .uno:Save
Log::info("Auto-save triggered for session " + it->getId());
- it->autoSaveTime = now;
+ it->_autoSaveTime = now;
}
}
}
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index f7b26ce..52e96c9 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -35,9 +35,9 @@ MasterProcessSession::MasterProcessSession(const std::string& id,
std::shared_ptr<Poco::Net::WebSocket> ws,
std::shared_ptr<DocumentBroker> docBroker) :
LOOLSession(id, kind, ws),
- lastMessageTime(0),
- idleSaveTime(0),
- autoSaveTime(0),
+ _lastMessageTime(0),
+ _idleSaveTime(0),
+ _autoSaveTime(0),
_curPart(0),
_loadPart(-1),
_docBroker(docBroker)
diff --git a/loolwsd/MasterProcessSession.hpp b/loolwsd/MasterProcessSession.hpp
index 7b0b0cb..defe5ea 100644
--- a/loolwsd/MasterProcessSession.hpp
+++ b/loolwsd/MasterProcessSession.hpp
@@ -50,9 +50,9 @@ class MasterProcessSession final : public LOOLSession, public std::enable_shared
static std::mutex AvailableChildSessionMutex;
static std::condition_variable AvailableChildSessionCV;
- time_t lastMessageTime;
- time_t idleSaveTime;
- time_t autoSaveTime;
+ time_t _lastMessageTime;
+ time_t _idleSaveTime;
+ time_t _autoSaveTime;
protected:
bool invalidateTiles(const char *buffer, int length, Poco::StringTokenizer& tokens);
More information about the Libreoffice-commits
mailing list