[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - kit/ChildSession.cpp test/httpwstest.cpp wsd/ClientSession.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 19 18:59:50 UTC 2019
kit/ChildSession.cpp | 1 +
test/httpwstest.cpp | 5 +++--
wsd/ClientSession.cpp | 8 +++++---
3 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 230fcd2f07192f30fb6d6671d905800fde71495e
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Oct 16 09:12:02 2019 -0400
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 19 20:59:31 2019 +0200
testSaveOnDisconnect: sync after pasting and better logging
Change-Id: Iaacbe0bdc6a7ba88d2f09c343d9579315033acbb
Reviewed-on: https://gerrit.libreoffice.org/80898
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 6699c67a5..d75809532 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -208,6 +208,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 6c6e9a625..d95c61a3a 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -777,7 +777,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 << "].");
@@ -971,7 +971,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 112eb511e..8517f0bb3 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -205,7 +205,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");
@@ -1187,7 +1187,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
@@ -1279,7 +1281,7 @@ void ClientSession::dumpState(std::ostream& os)
Session::dumpState(os);
os << "\t\tisReadOnly: " << isReadOnly()
- << "\n\t\tisDocumentOwner: " << _isDocumentOwner
+ << "\n\t\tisDocumentOwner: " << isDocumentOwner()
<< "\n\t\tisAttached: " << _isAttached
<< "\n\t\tkeyEvents: " << _keyEvents;
More information about the Libreoffice-commits
mailing list