diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-07-23 14:17:48 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-07-23 14:58:16 -0700 |
| commit | 285e0a41b0ad676a7015a237dd828eb686da1c14 (patch) | |
| tree | a5c3ca8eff362a54af04a10a9b0df39ddcb62798 /indra/newview/llscripteditorws.cpp | |
| parent | a6a2f98070cd55fcaadafc237bd0ffba9d466655 (diff) | |
Was not correctly parsing metadata from task inventory API, fix how I was using the cache control.
Diffstat (limited to 'indra/newview/llscripteditorws.cpp')
| -rw-r--r-- | indra/newview/llscripteditorws.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/indra/newview/llscripteditorws.cpp b/indra/newview/llscripteditorws.cpp index e0bf9b0b61..555affe9a1 100644 --- a/indra/newview/llscripteditorws.cpp +++ b/indra/newview/llscripteditorws.cpp @@ -156,11 +156,11 @@ namespace } return std::string(s); } -} -LLCachedControl<bool> LLScriptEditorWSServer::sEnableScriptEditorWS(gSavedSettings, "ExternalWebsocketSyncEnable", false); -LLCachedControl<bool> LLScriptEditorWSServer::sTightIntegration(gSavedSettings, "ExternalEditorTightIntegration", false); + LLCachedControl<bool>* OPT_ENABLESCRIPTEDITORWS(nullptr); + LLCachedControl<bool>* OPT_TIGHTINTEGRATION(nullptr); +} class LLPublishedPrimListener : public LLVOInventoryListener { @@ -203,8 +203,8 @@ private: }; //======================================================================== -LLScriptEditorWSServer::LLScriptEditorWSServer(const std::string& name, U16 port, bool local_only) - : LLJSONRPCServer(name, port, local_only) +LLScriptEditorWSServer::LLScriptEditorWSServer(const std::string& name, U16 port, bool local_only): + LLJSONRPCServer(name, port, local_only) { LL_INFOS("ScriptEditorWS") << "Created JSON-RPC script editor server: " << name << " on port " << port << LL_ENDL; @@ -221,6 +221,24 @@ LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::getServer() wsmgr.findServerByName(LLScriptEditorWSServer::DEFAULT_SERVER_NAME)); } +bool LLScriptEditorWSServer::isEnabled() +{ + if (!OPT_ENABLESCRIPTEDITORWS) + { + OPT_ENABLESCRIPTEDITORWS = new LLCachedControl<bool>(gSavedSettings, "ExternalWebsocketSyncEnable", false); + } + return *OPT_ENABLESCRIPTEDITORWS; +} + +bool LLScriptEditorWSServer::isTightIntegration() +{ + if (!OPT_TIGHTINTEGRATION) + { + OPT_TIGHTINTEGRATION = new LLCachedControl<bool>(gSavedSettings, "ExternalWebsocketSyncTightIntegration", false); + } + return *OPT_TIGHTINTEGRATION; +} + LLScriptEditorWSServer::ptr_t LLScriptEditorWSServer::ensureServerRunning() { if (!LLScriptEditorWSServer::isEnabled()) |
