wsd/DocumentBroker.hpp | 6 ++---- wsd/LOOLWSD.cpp | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-)
New commits: commit 8901fcf074da289bfc7063eff0e21175f439ae3a Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Mar 12 19:18:12 2017 -0400 wsd: ChildProcess doesn't need friends Change-Id: I1911920c9b49adecac4ea4d8fc4b0830687b80c7 Reviewed-on: https://gerrit.libreoffice.org/35121 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp index 9836872..8d7eb2a 100644 --- a/wsd/DocumentBroker.hpp +++ b/wsd/DocumentBroker.hpp @@ -60,8 +60,6 @@ public: /// to host a document. class ChildProcess { - // FIXME: urk ... - friend class PrisonerRequestDispatcher; public: /// @param pid is the process ID of the child. /// @param socket is the underlying Sockeet to the child. @@ -92,11 +90,11 @@ public: } void setDocumentBroker(const std::shared_ptr<DocumentBroker>& docBroker); + std::shared_ptr<DocumentBroker> getDocumentBroker() const { return _docBroker.lock(); } void stop() { - // FIXME: stop !? - LOG_ERR("What do we do for stop?"); + // Request the child to exit. try { if (isAlive()) diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index b8a2b9d..310d576 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -1454,7 +1454,7 @@ public: { // Notify the broker that we're done. auto child = _childProcess.lock(); - auto docBroker = child ? child->_docBroker.lock() : nullptr; + auto docBroker = child ? child->getDocumentBroker() : nullptr; if (docBroker) { // FIXME: No need to notify if asked to stop. @@ -1587,7 +1587,7 @@ private: LOG_TRC("Prisoner message [" << getAbbreviatedMessage(&data[0], data.size()) << "]."); auto child = _childProcess.lock(); - auto docBroker = child ? child->_docBroker.lock() : nullptr; + auto docBroker = child ? child->getDocumentBroker() : nullptr; if (docBroker) { // We should never destroy the broker, since @@ -1598,7 +1598,7 @@ private: return; } - LOG_WRN("Child " << child->_pid << + LOG_WRN("Child " << child->getPid() << " has no DocumentBroker to handle message: [" << LOOLProtocol::getAbbreviatedMessage(data) << "]."); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits