diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp index b4b82058b..3676aa005 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 13692c277..7ef2dfa2e 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& peer) { MasterProcessSession::_peer = _peer = peer; } diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp index 9c491bbb6..988883218 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 cc3debe44..92f2484ce 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 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 _docBroker; std::shared_ptr _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