[Libreoffice-commits] online.git: loolwsd/DocumentBroker.hpp loolwsd/MasterProcessSession.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Mar 14 03:17:22 UTC 2016


 loolwsd/DocumentBroker.hpp       |    2 +-
 loolwsd/MasterProcessSession.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e0b14c0e22f46a05de3cba3561f2f8300b90c5e5
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Mar 13 13:19:14 2016 -0400

    loolwsd: give Broker the docKey, not URL
    
    And reject connections with no doc URL.
    
    Change-Id: I11490be6aaea6a4ca2d66d8d2c8d6b52e1e48a04
    Reviewed-on: https://gerrit.libreoffice.org/23225
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp
index 544efbb..fd9efa3 100644
--- a/loolwsd/DocumentBroker.hpp
+++ b/loolwsd/DocumentBroker.hpp
@@ -33,7 +33,7 @@ public:
 
         // The URI of the document is url-encoded
         // and passed in our URL.
-        if (uri.size() > 1 && uri[0] == '/')
+        if (uri.size() > 0 && uri[0] == '/')
         {
             // Remove leading '/'.
             uri.erase(0, 1);
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index e1b7a6d..98941b3 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -750,7 +750,7 @@ void MasterProcessSession::dispatchChild()
         {
             Log::info() << "Retrying child permission... " << retries << Log::end;
             // request again new URL session
-            const std::string message = "request " + getId() + " " + _docURL + "\r\n";
+            const std::string message = "request " + getId() + " " + _docBroker->getDocKey() + "\r\n";
             Log::trace("MasterToBroker: " + message.substr(0, message.length()-2));
             Util::writeFIFO(LOOLWSD::BrokerWritePipe, message);
         }


More information about the Libreoffice-commits mailing list