wsd: kill unused headless stuff

Change-Id: Ic4ee7603ecd7acd10e4499457de181342f2d7483
Reviewed-on: https://gerrit.libreoffice.org/35735
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2017-03-26 23:04:27 -04:00 committed by Ashod Nakashian
parent b69d5683c3
commit f1c371555a
3 changed files with 3 additions and 25 deletions

View file

@ -68,13 +68,6 @@ public:
void closeFrame() { _isCloseFrame = true; };
bool isCloseFrame() const { return _isCloseFrame; }
bool isHeadless() const
{
// TODO loolnb here we should return true when there is no
// client socket (i.e. when converting documents).
return false;
}
protected:
Session(const std::string& name, const std::string& id);
virtual ~Session();

View file

@ -70,17 +70,8 @@ public:
// If in the correct thread - no need for wakeups.
assert (!docBroker || docBroker->isCorrectThread());
if (isHeadless())
{
// Fail silently and return as there is no actual websocket
// connection in this case.
LOG_INF(getName() << ": Headless peer, not forwarding message [" << data->abbr() << "].");
}
else
{
LOG_TRC(getName() << " enqueueing client message " << data->id());
_senderQueue.enqueue(data);
}
LOG_TRC(getName() << " enqueueing client message " << data->id());
_senderQueue.enqueue(data);
}
bool stopping() const { return _stop || _senderQueue.stopping(); }

View file

@ -1200,13 +1200,7 @@ bool DocumentBroker::forwardToClient(const std::shared_ptr<Message>& payload)
// Broadcast to all.
for (const auto& pair : _sessions)
{
#if 0 // loolnb
if (!pair.second->isHeadless() && !pair.second->isCloseFrame())
#endif
if (!pair.second->isHeadless())
{
pair.second->handleKitToClientMessage(data, size);
}
pair.second->handleKitToClientMessage(data, size);
}
}
else