diff options
Diffstat (limited to 'indra/llplugin')
-rw-r--r-- | indra/llplugin/llpluginclassmedia.cpp | 4 | ||||
-rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 18 | ||||
-rw-r--r-- | indra/llplugin/slplugin/CMakeLists.txt | 10 |
3 files changed, 22 insertions, 10 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp index 17f403e8e8..5eb22332d4 100644 --- a/indra/llplugin/llpluginclassmedia.cpp +++ b/indra/llplugin/llpluginclassmedia.cpp @@ -33,9 +33,7 @@ #include "llpluginmessageclasses.h" #include "llcontrol.h" -#if LL_DARWIN || LL_LINUX || __FreeBSD__ extern LLControlGroup gSavedSettings; -#endif #if LL_DARWIN extern bool gHiDPISupport; #endif @@ -936,10 +934,8 @@ void LLPluginClassMedia::setUserDataPath(const std::string &user_data_path_cache message.setValue("username", username); // cef shares cache between users but creates user-based contexts message.setValue("cef_log_file", user_data_path_cef_log); -#if LL_DARWIN || LL_LINUX || __FreeBSD__ bool cef_verbose_log = gSavedSettings.getBOOL("CefVerboseLog"); message.setValueBoolean("cef_verbose_log", cef_verbose_log); -#endif sendMessage(message); } diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index bd1e19c294..9e4640d20a 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -48,7 +48,7 @@ LLPluginProcessParentOwner::~LLPluginProcessParentOwner() bool LLPluginProcessParent::sUseReadThread = false; apr_pollset_t *LLPluginProcessParent::sPollSet = NULL; bool LLPluginProcessParent::sPollsetNeedsRebuild = false; -LLCoros::Mutex *LLPluginProcessParent::sInstancesMutex; +LLCoros::Mutex *LLPluginProcessParent::sInstancesMutex = nullptr; LLPluginProcessParent::mapInstances_t LLPluginProcessParent::sInstances; LLThread *LLPluginProcessParent::sReadThread = NULL; @@ -155,6 +155,12 @@ LLPluginProcessParent::ptr_t LLPluginProcessParent::create(LLPluginProcessParent /*static*/ void LLPluginProcessParent::shutdown() { + if (!sInstancesMutex) + { + // setup was not complete, skip shutdown + return; + } + LLCoros::LockType lock(*sInstancesMutex); mapInstances_t::iterator it; @@ -269,6 +275,9 @@ void LLPluginProcessParent::init(const std::string &launcher_filename, const std { mProcessParams.executable = launcher_filename; mProcessParams.cwd = plugin_dir; +#if LL_WINDOWS + mProcessParams.envs.add(llformat("SYSTEMROOT=%s", getenv("SYSTEMROOT"))); +#endif mPluginFile = plugin_filename; mPluginDir = plugin_dir; mCPUUsage = 0.0f; @@ -394,9 +403,14 @@ void LLPluginProcessParent::idle(void) apr_sockaddr_t* addr = NULL; mListenSocket = LLSocket::create(gAPRPoolp, LLSocket::STREAM_TCP); mBoundPort = 0; + if (!mListenSocket) + { + killSockets(); + errorState(); + break; + } // This code is based on parts of LLSocket::create() in lliosocket.cpp. - status = apr_sockaddr_info_get( &addr, "127.0.0.1", diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 3ad6d10336..2100e6f556 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -66,12 +66,14 @@ if (BUILD_SHARED_LIBS) endif () if (INSTALL) - if (DARWIN) + if (DARWIN OR WINDOWS) install(TARGETS ${PROJECT_NAME} DESTINATION .) - else (DARWIN) + elseif (${LINUX_DISTRO} MATCHES arch) + install(TARGETS ${PROJECT_NAME} DESTINATION lib/${VIEWER_BINARY_NAME}) + else () install(TARGETS ${PROJECT_NAME} DESTINATION libexec/${VIEWER_BINARY_NAME}) - endif (DARWIN) -endif (INSTALL) + endif () +endif () if (LL_TESTS) ll_deploy_sharedlibs_command(SLPlugin) |