kit/ChildSession.cpp  |    1 +
 test/httpwstest.cpp   |    5 +++--
 wsd/ClientSession.cpp |    8 +++++---
 3 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 10ffdc1e4a64c0ee2f15d781fdd13e18d2779565
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Wed Oct 16 09:12:02 2019 -0400
Commit:     Ashod Nakashian <ashnak...@gmail.com>
CommitDate: Tue Oct 29 01:43:17 2019 +0100

    testSaveOnDisconnect: sync after pasting and better logging
    
    Reviewed-on: https://gerrit.libreoffice.org/80898
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit 230fcd2f07192f30fb6d6671d905800fde71495e)
    
    Change-Id: Iaacbe0bdc6a7ba88d2f09c343d9579315033acbb
    Reviewed-on: https://gerrit.libreoffice.org/81569
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 05c9ba772..f67e3a1c1 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -213,6 +213,7 @@ bool ChildSession::_handleInput(const char *buffer, int 
length)
             sendTextFrame("error: cmd=load kind=faileddocloading");
         }
 
+        LOG_TRC("isDocLoaded state after loadDocument: " << _isDocLoaded << 
'.');
         return _isDocLoaded;
     }
     else if (!_isDocLoaded)
diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index f13e21582..d9a4727cf 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -591,7 +591,7 @@ void HTTPWSTest::testSaveOnDisconnect()
 
 void HTTPWSTest::testSavePassiveOnDisconnect()
 {
-    const char* testname = "saveOnPassiveDisconnect ";
+    const char* testname = "savePassiveOnDisconnect ";
 
     const std::string text = helpers::genRandomString(40);
     TST_LOG("Test string: [" << text << "].");
@@ -785,7 +785,8 @@ void HTTPWSTest::testLargePaste()
 
         const std::string documentContents = oss.str();
         TST_LOG("Pasting " << documentContents.size() << " characters into 
document.");
-        sendTextFrame(socket, "paste mimetype=text/html\n" + documentContents, 
testname);
+        sendTextFrame(socket, "paste mimetype=text/plain;charset=utf-8\n" + 
documentContents, testname);
+        getResponseString(socket, "textselection:", testname, 1000);
 
         // Check if the server is still alive.
         // This resulted first in a hang, as respose for the message never 
arrived, then a bit later in a Poco::TimeoutException.
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 8ddc0e91d..c2ca93237 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -452,7 +452,7 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
     {
         // If this session is the owner of the file & 'EnableOwnerTermination' 
feature
         // is turned on by WOPI, let it close all sessions
-        if (_isDocumentOwner && _wopiFileInfo && 
_wopiFileInfo->getEnableOwnerTermination())
+        if (isDocumentOwner() && _wopiFileInfo && 
_wopiFileInfo->getEnableOwnerTermination())
         {
             LOG_DBG("Session [" << getId() << "] requested owner termination");
             docBroker->closeDocument("ownertermination");
@@ -1567,7 +1567,9 @@ void ClientSession::removeOutdatedTilesOnFly()
         double elapsedTimeMs = 
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now()
 - tileIter->second).count();
         if(elapsedTimeMs > TILE_ROUNDTRIP_TIMEOUT_MS)
         {
-            LOG_WRN("Tracker tileID was dropped because of time out. 
Tileprocessed message did not arrive");
+            LOG_WRN("Tracker tileID " << tileIter->first << " was dropped 
because of time out ("
+                                      << elapsedTimeMs
+                                      << " ms). Tileprocessed message did not 
arrive in time.");
             _tilesOnFly.erase(tileIter);
         }
         else
@@ -1659,7 +1661,7 @@ void ClientSession::dumpState(std::ostream& os)
     Session::dumpState(os);
 
     os << "\t\tisReadOnly: " << isReadOnly()
-       << "\n\t\tisDocumentOwner: " << _isDocumentOwner
+       << "\n\t\tisDocumentOwner: " << isDocumentOwner()
        << "\n\t\tstate: " << stateToString(_state)
        << "\n\t\tkeyEvents: " << _keyEvents
 //       << "\n\t\tvisibleArea: " << _clientVisibleArea
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to