[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp loolwsd/LOOLKit.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Aug 15 03:10:47 UTC 2016
loolwsd/ChildSession.cpp | 20 ++------------------
loolwsd/LOOLKit.cpp | 21 ++++++++-------------
2 files changed, 10 insertions(+), 31 deletions(-)
New commits:
commit 6af13994e68788c5ddc5618758d7ee76932c27bd
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Aug 13 19:17:03 2016 -0400
loolwsd: cleanup and simplify
Change-Id: I48a841a3ce6638e33a96ed44c75e6d2e17dc1c37
Reviewed-on: https://gerrit.libreoffice.org/28125
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index aedcfa6..3cda3ff 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -10,42 +10,26 @@
#include "ChildSession.hpp"
#include "config.h"
-#include <iostream>
-#include <thread>
-
-#include <Poco/Exception.h>
#include <Poco/JSON/Object.h>
#include <Poco/JSON/Parser.h>
#include <Poco/Net/WebSocket.h>
-#include <Poco/Notification.h>
-#include <Poco/NotificationQueue.h>
-#include <Poco/Path.h>
-#include <Poco/String.h>
#include <Poco/StringTokenizer.h>
#include <Poco/URI.h>
-#include "Common.hpp"
#include "LOKitHelper.hpp"
-#include "LOOLProtocol.hpp"
#include "Log.hpp"
#include "Png.hpp"
-#include "Rectangle.hpp"
#include "Util.hpp"
-using namespace LOOLProtocol;
-
-using Poco::AutoPtr;
-using Poco::Exception;
using Poco::JSON::Object;
using Poco::JSON::Parser;
using Poco::Net::WebSocket;
-using Poco::Notification;
-using Poco::NotificationQueue;
-using Poco::Runnable;
using Poco::StringTokenizer;
using Poco::Timestamp;
using Poco::URI;
+using namespace LOOLProtocol;
+
std::recursive_mutex ChildSession::Mutex;
ChildSession::ChildSession(const std::string& id,
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index bb67ef9..994e2a7 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -64,8 +64,6 @@
typedef int (LokHookPreInit) (const char *install_path, const char *user_profile_path);
-using namespace LOOLProtocol;
-
using Poco::AutoPtr;
using Poco::Exception;
using Poco::File;
@@ -85,6 +83,8 @@ using Poco::Timestamp;
using Poco::URI;
using Poco::Util::Application;
+using namespace LOOLProtocol;
+
namespace
{
typedef enum { COPY_ALL, COPY_LO, COPY_NO_USR } LinkOrCopyType;
@@ -416,7 +416,8 @@ public:
"]. There are " + std::to_string(_clientViews) + " views.");
// Wait for the callback worker to finish.
- stop();
+ _stop = true;
+ _callbackQueue.wakeUpAll();
_callbackThread.join();
// Flag all connections to stop.
@@ -824,10 +825,10 @@ private:
/// Load a document (or view) and register callbacks.
std::shared_ptr<lok::Document> onLoad(const std::string& sessionId,
- const std::string& uri,
- const std::string& docPassword,
- const std::string& renderOpts,
- bool haveDocPassword)
+ const std::string& uri,
+ const std::string& docPassword,
+ const std::string& renderOpts,
+ bool haveDocPassword)
{
Log::info("Session " + sessionId + " is loading. " + std::to_string(_clientViews) + " views loaded.");
@@ -1064,12 +1065,6 @@ private:
Log::debug("Thread finished.");
}
- void stop()
- {
- _stop = true;
- _callbackQueue.wakeUpAll();
- }
-
private:
const bool _multiView;
More information about the Libreoffice-commits
mailing list