wsd/LOOLWSD.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 28063e00a77091176102a191726e57835d26b7d6 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Apr 16 23:47:46 2017 -0400 wsd: take DocBrokers lock before broadcasting diskfull alertAllUsersInternal does not have the DocBrokersMutex when called from forkChildren, which was intentionally removed a while back since it's not normally necessary. That is, unless we have diskfull situation and need to broadcast to clients. We now take the lock explicitly in alertAllUsersInternal before enumerating DocBrokers to broadcast the notification to the user, since there is no use case for calling it under that lock now. Change-Id: I4f7cccb1112c17091d1039441af4c84d5d13d059 Reviewed-on: https://gerrit.libreoffice.org/36601 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> (cherry picked from commit 6023fdc3c70a2d2aad2c98c8e739f19d7a630e8b) Reviewed-on: https://gerrit.libreoffice.org/36611 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index e42010a1..c432a862 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -209,7 +209,7 @@ inline void shutdownLimitReached(WebSocketHandler& ws) /// connected to any document. void alertAllUsersInternal(const std::string& msg) { - Util::assertIsLocked(DocBrokersMutex); + std::lock_guard<std::mutex> docBrokersLock(DocBrokersMutex); LOG_INF("Alerting all users: [" << msg << "]"); @@ -2575,8 +2575,6 @@ void alertAllUsers(const std::string& cmd, const std::string& kind) void alertAllUsers(const std::string& msg) { - std::lock_guard<std::mutex> docBrokersLock(DocBrokersMutex); - alertAllUsersInternal(msg); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits