wsd/LOOLWSD.cpp | 2 ++ wsd/LOOLWSD.hpp | 10 ++++++++++ 2 files changed, 12 insertions(+)
New commits: commit 1d3ac69ffd5e4024878d87409ccb87c83cbd37c3 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue Aug 20 11:20:22 2019 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Aug 20 10:55:32 2019 +0200 Avoid some "RuntimeConstant instance read before being initialized" issues (In the !ENABLE_SSL case.) Possibly the SSL or not ifdeffery could be cleaned up a bit more. Change-Id: I0c9b4e956dcd317d6622a7394044fed0c4f2d976 Reviewed-on: https://gerrit.libreoffice.org/77780 Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index dd62d2929..e0518479d 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -710,8 +710,10 @@ std::string LOOLWSD::ConfigDir = LOOLWSD_CONFIGDIR "/conf.d"; std::string LOOLWSD::LogLevel = "trace"; bool LOOLWSD::AnonymizeUserData = false; std::uint64_t LOOLWSD::AnonymizationSalt = 82589933; +#if ENABLE_SSL Util::RuntimeConstant<bool> LOOLWSD::SSLEnabled; Util::RuntimeConstant<bool> LOOLWSD::SSLTermination; +#endif unsigned LOOLWSD::MaxConnections; unsigned LOOLWSD::MaxDocuments; std::string LOOLWSD::OverrideWatermark; diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp index 2e6c68e70..7c4103e3b 100644 --- a/wsd/LOOLWSD.hpp +++ b/wsd/LOOLWSD.hpp @@ -92,12 +92,20 @@ public: static bool isSSLEnabled() { +#if ENABLE_SSL return LOOLWSD::SSLEnabled.get(); +#else + return false; +#endif } static bool isSSLTermination() { +#if ENABLE_SSL return LOOLWSD::SSLTermination.get(); +#else + return false; +#endif } /// Return true iff extension is marked as view action in discovery.xml. @@ -182,8 +190,10 @@ protected: void cleanup(); private: +#if ENABLE_SSL static Util::RuntimeConstant<bool> SSLEnabled; static Util::RuntimeConstant<bool> SSLTermination; +#endif void initializeSSL(); void displayHelp(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits