wsd/Admin.cpp | 4 ++-- wsd/LOOLWSD.cpp | 4 ++-- wsd/LOOLWSD.hpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 78ba2193936fb56ab1ef10d8378f15530010614f Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Sat Sep 21 14:15:37 2019 -0400 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Thu Oct 10 14:29:30 2019 +0200 wsd: SessionId -> ConnectionId "Session" is too generic and can be misleading. This is really a connection ID, or a connection-session ID, so it's more sensible to call it ConnectionId to signify that it's a connection-specific ID. Change-Id: I0f12b1cf80d4853a27535101093ef6b7a3e0d438 Reviewed-on: https://gerrit.libreoffice.org/79332 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp index 498053604..915c9d073 100644 --- a/wsd/Admin.cpp +++ b/wsd/Admin.cpp @@ -279,7 +279,7 @@ AdminSocketHandler::AdminSocketHandler(Admin* adminManager, _isAuthenticated(false) { // Different session id pool for admin sessions (?) - _sessionId = Util::decodeId(LOOLWSD::GenSessionId()); + _sessionId = Util::decodeId(LOOLWSD::GetConnectionId()); } AdminSocketHandler::AdminSocketHandler(Admin* adminManager) @@ -287,7 +287,7 @@ AdminSocketHandler::AdminSocketHandler(Admin* adminManager) _admin(adminManager), _isAuthenticated(true) { - _sessionId = Util::decodeId(LOOLWSD::GenSessionId()); + _sessionId = Util::decodeId(LOOLWSD::GetConnectionId()); } void AdminSocketHandler::sendTextFrame(const std::string& message) diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 9a1a46e92..34e617ee2 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -676,7 +676,7 @@ inline std::string getAdminURI(const Poco::Util::LayeredConfiguration &config) #endif // MOBILEAPP -std::atomic<unsigned> LOOLWSD::NextSessionId; +std::atomic<unsigned> LOOLWSD::NextConnectionId(1); #ifndef KIT_IN_PROCESS std::atomic<int> LOOLWSD::ForKitWritePipe(-1); std::atomic<int> LOOLWSD::ForKitProcId(-1); @@ -2029,7 +2029,7 @@ private: /// Set the socket associated with this ResponseClient. void onConnect(const std::shared_ptr<StreamSocket>& socket) override { - _id = LOOLWSD::GenSessionId(); + _id = LOOLWSD::GetConnectionId(); _socket = socket; LOG_TRC("#" << socket->getFD() << " Connected to ClientRequestDispatcher."); } diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp index 6f1eedbf6..6b53a5d68 100644 --- a/wsd/LOOLWSD.hpp +++ b/wsd/LOOLWSD.hpp @@ -45,7 +45,7 @@ public: // An Application is a singleton anyway, // so just keep these as statics. - static std::atomic<unsigned> NextSessionId; + static std::atomic<unsigned> NextConnectionId; static unsigned int NumPreSpawnedChildren; static bool NoCapsForKit; static bool NoSeccomp; @@ -79,9 +79,9 @@ public: static std::vector<int> getKitPids(); - static std::string GenSessionId() + static std::string GetConnectionId() { - return Util::encodeId(++NextSessionId, 4); + return Util::encodeId(NextConnectionId++, 3); } static bool isSSLEnabled() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits