[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Jan 16 01:59:33 UTC 2017


 wsd/DocumentBroker.cpp |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit bc36241d895f4451f0ff95fe889f81e9d5fabebb
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Jan 13 18:10:10 2017 -0500

    wsd: cosmetics
    
    Change-Id: I250590b105dbfdd6a0589327fece752481253863
    Reviewed-on: https://gerrit.libreoffice.org/33127
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index f1db30b..e532fb5 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -596,9 +596,6 @@ size_t DocumentBroker::addSession(std::shared_ptr<ClientSession>& session)
 {
     Util::assertIsLocked(_mutex);
 
-    const auto id = session->getId();
-    const std::string aMessage = "session " + id + " " + _docKey;
-
     try
     {
         // First load the document, since this can fail.
@@ -626,6 +623,7 @@ size_t DocumentBroker::addSession(std::shared_ptr<ClientSession>& session)
     _lastEditableSession = false;
     _markToDestroy = false;
 
+    const auto id = session->getId();
     if (!_sessions.emplace(id, session).second)
     {
         LOG_WRN("DocumentBroker: Trying to add already existing session.");
@@ -634,6 +632,7 @@ size_t DocumentBroker::addSession(std::shared_ptr<ClientSession>& session)
     const auto count = _sessions.size();
 
     // Request a new session from the child kit.
+    const std::string aMessage = "session " + id + ' ' + _docKey;
     _childProcess->sendTextFrame(aMessage);
 
     // Now we are ready to bridge between the kit and client.


More information about the Libreoffice-commits mailing list