loolwsd/DocumentBroker.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 85641d934e27eab4206f6e6c81646ea142539284 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Apr 10 13:06:35 2016 -0400 loolwsd: for consistency always remove edit lock before taking it Change-Id: Id24d6737fc3af77097058b28a77d6ca2d757cb9e Reviewed-on: https://gerrit.libreoffice.org/23965 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index 4551270..4b25e48 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -239,17 +239,18 @@ void DocumentBroker::addWSSession(const std::string id, std::shared_ptr<MasterPr void DocumentBroker::removeWSSession(const std::string id) { std::lock_guard<std::mutex> sessionsLock(_wsSessionsMutex); - bool bEditLock = false; + + bool haveEditLock = false; auto it = _wsSessions.find(id); if (it != _wsSessions.end()) { - if (it->second->isEditLocked()) - bEditLock = true; - + haveEditLock = it->second->isEditLocked(); + it->second->setEditLock(false); + it->second->sendTextFrame("editlock 0"); _wsSessions.erase(it); } - if (bEditLock) + if (haveEditLock) { // pass the edit lock to first session in map it = _wsSessions.begin(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits