[Libreoffice-commits] online.git: loolwsd/ClientSession.cpp loolwsd/ClientSession.hpp loolwsd/MasterProcessSession.cpp loolwsd/MasterProcessSession.hpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue May 17 03:19:36 UTC 2016
loolwsd/ClientSession.cpp | 4 ++--
loolwsd/ClientSession.hpp | 6 +++---
loolwsd/MasterProcessSession.cpp | 8 --------
loolwsd/MasterProcessSession.hpp | 9 ---------
4 files changed, 5 insertions(+), 22 deletions(-)
New commits:
commit 1e84102aae466dc550e4ea1f4678525b36021fc4
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon May 16 19:44:15 2016 -0400
loolwsd: MasterProcessSession splitting: move edit lock
Change-Id: I8339f28cb9ed0ed1a5b1f4cf38d6083450cb4fdc
Reviewed-on: https://gerrit.libreoffice.org/25045
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp
index b4b8205..3676aa0 100644
--- a/loolwsd/ClientSession.cpp
+++ b/loolwsd/ClientSession.cpp
@@ -225,7 +225,7 @@ bool ClientSession::getStatus(const char *buffer, int length)
forwardToPeer(buffer, length);
return true;
}
-/*
+
void ClientSession::setEditLock(const bool value)
{
// Update the sate and forward to child.
@@ -233,7 +233,7 @@ void ClientSession::setEditLock(const bool value)
const auto msg = std::string("editlock: ") + (value ? "1" : "0");
forwardToPeer(msg.data(), msg.size());
}
-*/
+
bool ClientSession::getCommandValues(const char *buffer, int length, StringTokenizer& tokens)
{
std::string command;
diff --git a/loolwsd/ClientSession.hpp b/loolwsd/ClientSession.hpp
index 13692c2..7ef2dfa 100644
--- a/loolwsd/ClientSession.hpp
+++ b/loolwsd/ClientSession.hpp
@@ -28,9 +28,9 @@ public:
virtual ~ClientSession();
- //void setEditLock(const bool value);
- //void markEditLock(const bool value) { _bEditLock = value; }
- //bool isEditLocked() const { return _bEditLock; }
+ void setEditLock(const bool value);
+ void markEditLock(const bool value) { _bEditLock = value; }
+ bool isEditLocked() const { return _bEditLock; }
void setPeer(const std::shared_ptr<PrisonerSession>& peer) { MasterProcessSession::_peer = _peer = peer; }
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index 9c491bb..9888832 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -49,14 +49,6 @@ MasterProcessSession::~MasterProcessSession()
{
}
-void MasterProcessSession::setEditLock(const bool value)
-{
- // Update the sate and forward to child.
- _bEditLock = value;
- const auto msg = std::string("editlock: ") + (value ? "1" : "0");
- forwardToPeer(msg.data(), msg.size());
-}
-
void MasterProcessSession::dispatchChild()
{
std::ostringstream oss;
diff --git a/loolwsd/MasterProcessSession.hpp b/loolwsd/MasterProcessSession.hpp
index cc3debe..92f2484 100644
--- a/loolwsd/MasterProcessSession.hpp
+++ b/loolwsd/MasterProcessSession.hpp
@@ -33,10 +33,6 @@ class MasterProcessSession : public LOOLSession, public std::enable_shared_from_
std::shared_ptr<BasicTileQueue> getQueue() const { return _queue; }
- void setEditLock(const bool value);
- void markEditLock(const bool value) { _bEditLock = value; }
- bool isEditLocked() const { return _bEditLock; }
-
bool shutdownPeer(Poco::UInt16 statusCode, const std::string& message);
protected:
@@ -56,11 +52,6 @@ class MasterProcessSession : public LOOLSession, public std::enable_shared_from_
int _loadPart;
std::shared_ptr<DocumentBroker> _docBroker;
std::shared_ptr<BasicTileQueue> _queue;
-
- // If this document holds the edit lock.
- // An edit lock will only allow the current session to make edits,
- // while other session opening the same document can only see
- bool _bEditLock = false;
};
#endif
More information about the Libreoffice-commits
mailing list