loolwsd/ChildSession.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
New commits: commit aa674fbdbdf600eba1b4e0babd6c1abfe88adf84 Author: Pranav Kant <[email protected]> Date: Wed Oct 5 16:55:56 2016 +0530 loolwsd: Set view id before calling documentStatus ... otherwise in some cases viewid that is set internally in core is different from the one which is being loaded resulting in an incorrect status message which then leads to lot of other problems as well. Change-Id: I8488d7d54b211a6b6f6028128f8dfc3388b73efd diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp index e24a516..62747e5 100644 --- a/loolwsd/ChildSession.cpp +++ b/loolwsd/ChildSession.cpp @@ -311,6 +311,7 @@ bool ChildSession::loadDocument(const char * /*buffer*/, int /*length*/, StringT // Respond by the document status Log::debug("Sending status after loading view " + std::to_string(_viewId) + "."); + _loKitDocument->setView(_viewId); const auto status = LOKitHelper::documentStatus(_loKitDocument->get()); if (status.empty() || !sendTextFrame("status: " + status)) { commit d5fdb210aabc68101fdb3f5ae625e8c7a1d6ad9d Author: Pranav Kant <[email protected]> Date: Wed Oct 5 16:42:20 2016 +0530 loolwsd: Kill unused code Change-Id: I7c8d16ce2358ca9ab41fcc57a8e9b9241b240150 diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp index 81e5c8d..e24a516 100644 --- a/loolwsd/ChildSession.cpp +++ b/loolwsd/ChildSession.cpp @@ -302,16 +302,7 @@ bool ChildSession::loadDocument(const char * /*buffer*/, int /*length*/, StringT return false; } - std::ostringstream ossViewInfo; - const auto viewId = std::to_string(_viewId); - - // Create a message object - Object::Ptr viewInfoObj = new Object(); - viewInfoObj->set("id", viewId); - viewInfoObj->set("username", _userName); - viewInfoObj->stringify(ossViewInfo); - - Log::info("Created new view with viewid: [" + viewId + "] for username: [" + _userName + "]."); + Log::info("Created new view with viewid: [" + std::to_string(_viewId) + "] for username: [" + _userName + "]."); _docType = LOKitHelper::getDocumentTypeAsString(_loKitDocument->get()); if (_docType != "text" && part != -1) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
