unipoll: remove now redundant SocketPoll parameters.

Change-Id: I8308a0b503db34ac43658a5461005a32132d392f
This commit is contained in:
Michael Meeks 2019-05-10 18:03:11 +01:00
parent 501caaa164
commit 70eb802184

View file

@ -873,7 +873,6 @@ public:
const std::string& docId, const std::string& docId,
const std::string& url, const std::string& url,
std::shared_ptr<TileQueue> tileQueue, std::shared_ptr<TileQueue> tileQueue,
SocketPoll& /*socketPoll*/,
const std::shared_ptr<WebSocketHandler>& websocketHandler) const std::shared_ptr<WebSocketHandler>& websocketHandler)
: _loKit(loKit), : _loKit(loKit),
_jailId(jailId), _jailId(jailId),
@ -2209,16 +2208,14 @@ class KitWebSocketHandler final : public WebSocketHandler, public std::enable_sh
std::string _socketName; std::string _socketName;
std::shared_ptr<lok::Office> _loKit; std::shared_ptr<lok::Office> _loKit;
std::string _jailId; std::string _jailId;
SocketPoll& _socketPoll;
public: public:
KitWebSocketHandler(const std::string& socketName, const std::shared_ptr<lok::Office>& loKit, const std::string& jailId, SocketPoll& socketPoll) : KitWebSocketHandler(const std::string& socketName, const std::shared_ptr<lok::Office>& loKit, const std::string& jailId) :
WebSocketHandler(/* isClient = */ true, /* isMasking */ false), WebSocketHandler(/* isClient = */ true, /* isMasking */ false),
_queue(std::make_shared<TileQueue>()), _queue(std::make_shared<TileQueue>()),
_socketName(socketName), _socketName(socketName),
_loKit(loKit), _loKit(loKit),
_jailId(jailId), _jailId(jailId)
_socketPoll(socketPoll)
{ {
} }
@ -2269,9 +2266,7 @@ protected:
LOG_INF("New session [" << sessionId << "] request on url [" << url << "]."); LOG_INF("New session [" << sessionId << "] request on url [" << url << "].");
if (!document) if (!document)
{ document = std::make_shared<Document>(_loKit, _jailId, docKey, docId, url, _queue, shared_from_this());
document = std::make_shared<Document>(_loKit, _jailId, docKey, docId, url, _queue, _socketPoll, shared_from_this());
}
// Validate and create session. // Validate and create session.
if (!(url == document->getUrl() && document->createSession(sessionId))) if (!(url == document->getUrl() && document->createSession(sessionId)))
@ -2720,7 +2715,7 @@ void lokit_main(
mainKit.runOnClientThread(); // We will do the polling on this thread. mainKit.runOnClientThread(); // We will do the polling on this thread.
std::shared_ptr<SocketHandlerInterface> websocketHandler = std::shared_ptr<SocketHandlerInterface> websocketHandler =
std::make_shared<KitWebSocketHandler>("child_ws", loKit, jailId, mainKit); std::make_shared<KitWebSocketHandler>("child_ws", loKit, jailId);
#if !MOBILEAPP #if !MOBILEAPP
mainKit.insertNewUnixSocket(MasterLocation, pathAndQuery, websocketHandler); mainKit.insertNewUnixSocket(MasterLocation, pathAndQuery, websocketHandler);
#else #else