[Libreoffice-commits] online.git: kit/ChildSession.cpp test/httpwstest.cpp wsd/ClientSession.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 29 00:43:43 UTC 2019
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.nakashian at collabora.co.uk>
AuthorDate: Wed Oct 16 09:12:02 2019 -0400
Commit: Ashod Nakashian <ashnakash at 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.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
(cherry picked from commit 230fcd2f07192f30fb6d6671d905800fde71495e)
Change-Id: Iaacbe0bdc6a7ba88d2f09c343d9579315033acbb
Reviewed-on: https://gerrit.libreoffice.org/81569
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at 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
More information about the Libreoffice-commits
mailing list