wsd/LOOLWSD.cpp |   10 +++++++---
 wsd/LOOLWSD.hpp |    6 +++++-
 2 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 6b8456679f10afc01fa92726bb1b5caa211385d0
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Mon Apr 20 11:47:50 2020 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Mon Apr 20 11:17:29 2020 +0200

    Surround some code that is unused in the mobile apps with #if !MOBILEAPP
    
    Reduces the risk of starting to look into something that is actually
    never used in the mobile apps, when your intent is to re-work
    soemthing for the mobile apps.
    
    Change-Id: I04c562758a1b336690c7adbfd32b260cf26d9f87
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92554
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 9ab86355a..d54788d49 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -696,11 +696,11 @@ inline std::string getServiceURI(const std::string &sub, 
bool asAdmin = false)
 
 std::atomic<uint64_t> LOOLWSD::NextConnectionId(1);
 
+#if !MOBILEAPP
 #ifndef KIT_IN_PROCESS
 std::atomic<int> LOOLWSD::ForKitProcId(-1);
 std::shared_ptr<ForKitProcess> LOOLWSD::ForKitProc;
 #endif
-#if !MOBILEAPP
 bool LOOLWSD::NoCapsForKit = false;
 bool LOOLWSD::NoSeccomp = false;
 bool LOOLWSD::AdminEnabled = true;
@@ -755,6 +755,7 @@ public:
     /// Check prisoners are still alive and balanced.
     void wakeupHook() override;
 
+#if !MOBILEAPP
     // Resets the forkit porcess object
     void setForKitProcess(const std::weak_ptr<ForKitProcess>& forKitProc)
     {
@@ -790,6 +791,7 @@ public:
 
 private:
     std::weak_ptr<ForKitProcess> _forKitProc;
+#endif
 };
 
 /// This thread listens for and accepts prisoner kit processes.
@@ -809,6 +811,8 @@ public:
     }
 };
 
+#if !MOBILEAPP
+
 void ForKitProcWSHandler::handleMessage(const std::vector<char> &data)
 {
     LOG_TRC("ForKitProcWSHandler: handling incoming [" << 
LOOLProtocol::getAbbreviatedMessage(&data[0], data.size()) << "].");
@@ -820,9 +824,7 @@ void ForKitProcWSHandler::handleMessage(const 
std::vector<char> &data)
         int count = std::stoi(tokens[1]);
         if (count >= 0)
         {
-#if !MOBILEAPP
             Admin::instance().addSegFaultCount(count);
-#endif
             LOG_INF(count << " loolkit processes crashed with segmentation 
fault.");
         }
         else
@@ -836,6 +838,8 @@ void ForKitProcWSHandler::handleMessage(const 
std::vector<char> &data)
     }
 }
 
+#endif
+
 LOOLWSD::LOOLWSD()
 {
 }
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index c391cc055..ea3f33f3d 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -181,6 +181,8 @@ public:
     std::shared_ptr<Socket> _socket;
 };
 
+#if !MOBILEAPP
+
 class ForKitProcWSHandler: public WebSocketHandler
 {
 public:
@@ -203,6 +205,8 @@ public:
     }
 };
 
+#endif
+
 /// The Server class which is responsible for all
 /// external interactions.
 class LOOLWSD : public Poco::Util::ServerApplication
@@ -221,10 +225,10 @@ public:
     static bool AdminEnabled;
 #if ENABLE_DEBUG
     static bool SingleKit;
-#endif
 #endif
     static std::shared_ptr<ForKitProcess> ForKitProc;
     static std::atomic<int> ForKitProcId;
+#endif
     static bool DummyLOK;
     static std::string FuzzFileName;
     static std::string ConfigFile;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to