Fix broken conditional compilation for WASM.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Change-Id: Ib0f3733a0719c87281b432c7c009fc2362ad3ccepull/8880/head
parent
31624e869c
commit
d2dae8f2b5
|
@ -2297,6 +2297,7 @@ void COOLWSD::innerInitialize(Application& self)
|
|||
? COOLWSD::WASMActivationState::Enabled
|
||||
: COOLWSD::WASMActivationState::Disabled;
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
if (getConfigValue<bool>(conf, "wasm.force", false))
|
||||
{
|
||||
if (COOLWSD::WASMState != COOLWSD::WASMActivationState::Enabled)
|
||||
|
@ -2310,6 +2311,7 @@ void COOLWSD::innerInitialize(Application& self)
|
|||
LOG_INF("WASM is force-enabled. All documents will be loaded through WASM");
|
||||
COOLWSD::WASMState = COOLWSD::WASMActivationState::Forced;
|
||||
}
|
||||
#endif
|
||||
#endif // !MOBILEAPP
|
||||
|
||||
// Get anonymization settings.
|
||||
|
|
|
@ -300,7 +300,7 @@ public:
|
|||
{
|
||||
Disabled,
|
||||
Enabled
|
||||
#ifdef ENABLE_DEBUG
|
||||
#if ENABLE_DEBUG
|
||||
,
|
||||
Forced //< When Forced, only WASM is served.
|
||||
#endif
|
||||
|
|
|
@ -950,11 +950,13 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ
|
|||
#if !MOBILEAPP
|
||||
bool isWasm = false;
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
if (COOLWSD::WASMState == COOLWSD::WASMActivationState::Forced)
|
||||
{
|
||||
isWasm = (path.find("/browser/dist/wasm/") == std::string::npos);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const std::string wopiSrc = requestDetails.getLineModeKey(std::string());
|
||||
if (!wopiSrc.empty())
|
||||
|
|
Loading…
Reference in New Issue