diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llaudio/llaudioengine_fmodex.cpp | 9 | ||||
| -rw-r--r-- | indra/llrender/llgl.cpp | 7 | ||||
| -rw-r--r-- | indra/llui/llurlentry.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llcommandlineparser.cpp | 31 | ||||
| -rw-r--r-- | indra/newview/llinventorymodel.cpp | 64 | ||||
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 68 | ||||
| -rw-r--r-- | indra/newview/llmeshrepository.h | 5 | ||||
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llsecapi.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 2 | 
10 files changed, 140 insertions, 74 deletions
| diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp index 7e65a05e48..5c3f52b201 100644 --- a/indra/llaudio/llaudioengine_fmodex.cpp +++ b/indra/llaudio/llaudioengine_fmodex.cpp @@ -758,10 +758,11 @@ FMOD_RESULT F_CALLBACK windCallback(FMOD_DSP_STATE *dsp_state, float *originalbu  	FMOD::DSP *thisdsp = (FMOD::DSP *)dsp_state->instance;  	thisdsp->getUserData((void **)&windgen); -	S32 channels, configwidth, configheight; -	thisdsp->getInfo(0, 0, &channels, &configwidth, &configheight); -	 -	windgen->windGenerate((LLAudioEngine_FMODEX::MIXBUFFERFORMAT *)newbuffer, length); + +    if (windgen) +    { +        windgen->windGenerate((LLAudioEngine_FMODEX::MIXBUFFERFORMAT *)newbuffer, length); +    }  	return FMOD_OK;  } diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index c01c15391d..4df9074394 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -2631,10 +2631,11 @@ LLGLSPipelineBlendSkyBox::LLGLSPipelineBlendSkyBox(bool depth_test, bool depth_w  }  #if LL_WINDOWS -// Expose desired use of high-performance graphics processor to Optimus driver +// Expose desired use of high-performance graphics processor to Optimus driver and to AMD driver  extern "C"  -{  -    _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;  +{ +    __declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; +    __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;  }  #endif diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 333d03f208..e6835f73fb 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -454,13 +454,17 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const  }  // -// LLUrlEntrySeconlifeURL Describes *secondlife.com/ *lindenlab.com/ and *tilia-inc.com/ urls to substitute icon 'hand.png' before link +// LLUrlEntrySeconlifeURL Describes *secondlife.com/ *lindenlab.com/ *secondlifegrid.net/ and *tilia-inc.com/ urls to substitute icon 'hand.png' before link  //  LLUrlEntrySecondlifeURL::LLUrlEntrySecondlifeURL()  {                                	mPattern = boost::regex("((http://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com)"  							"|" -							"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(:\\d{1,5})?))" +							"(http://([-\\w\\.]*\\.)?secondlifegrid\\.net)" +							"|" +							"(https://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(:\\d{1,5})?)" +							"|" +							"(https://([-\\w\\.]*\\.)?secondlifegrid\\.net(:\\d{1,5})?))"  							"\\/\\S*",  		boost::regex::perl|boost::regex::icase); @@ -495,12 +499,14 @@ std::string LLUrlEntrySecondlifeURL::getTooltip(const std::string &url) const  }  // -// LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com *lindenlab.com and *tilia-inc.com urls to substitute icon 'hand.png' before link +// LLUrlEntrySimpleSecondlifeURL Describes *secondlife.com *lindenlab.com *secondlifegrid.net and *tilia-inc.com urls to substitute icon 'hand.png' before link  //  LLUrlEntrySimpleSecondlifeURL::LLUrlEntrySimpleSecondlifeURL()    { -	mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(?!\\S)", -		boost::regex::perl|boost::regex::icase); +	mPattern = boost::regex("https?://([-\\w\\.]*\\.)?(secondlife|lindenlab|tilia-inc)\\.com(?!\\S)" +							"|" +							"https?://([-\\w\\.]*\\.)?secondlifegrid\\.net(?!\\S)", +							boost::regex::perl|boost::regex::icase);  	mIcon = "Hand";  	mMenuName = "menu_url_http.xml"; diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp index fe14bc081f..06d959ba3c 100644 --- a/indra/newview/llcommandlineparser.cpp +++ b/indra/newview/llcommandlineparser.cpp @@ -402,23 +402,30 @@ bool LLCommandLineParser::parseCommandLineString(const std::string& str)          }      } -    // Split the string content into tokens -    const char* escape_chars = "\\"; -    const char* separator_chars = "\r\n "; -    const char* quote_chars = "\"'"; -    boost::escaped_list_separator<char> sep(escape_chars, separator_chars, quote_chars); -    boost::tokenizer< boost::escaped_list_separator<char> > tok(cmd_line_string, sep);      std::vector<std::string> tokens; -    // std::copy(tok.begin(), tok.end(), std::back_inserter(tokens)); -    for(boost::tokenizer< boost::escaped_list_separator<char> >::iterator i = tok.begin(); -        i != tok.end(); -        ++i) +    try      { -        if(0 != i->size()) +        // Split the string content into tokens +        const char* escape_chars = "\\"; +        const char* separator_chars = "\r\n "; +        const char* quote_chars = "\"'"; +        boost::escaped_list_separator<char> sep(escape_chars, separator_chars, quote_chars); +        boost::tokenizer< boost::escaped_list_separator<char> > tok(cmd_line_string, sep); +        // std::copy(tok.begin(), tok.end(), std::back_inserter(tokens)); +        for (boost::tokenizer< boost::escaped_list_separator<char> >::iterator i = tok.begin(); +            i != tok.end(); +            ++i)          { -            tokens.push_back(*i); +            if (0 != i->size()) +            { +                tokens.push_back(*i); +            }          }      } +    catch (...) +    { +        CRASH_ON_UNHANDLED_EXCEPTION(STRINGIZE("Unexpected crash while parsing: " << str)); +    }      po::command_line_parser clp(tokens);      return parseAndStoreResults(clp); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 17e80dca89..e7093eac02 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -678,17 +678,59 @@ void LLInventoryModel::createNewCategoryCoro(std::string url, LLSD postData, inv      LLUUID categoryId = result["folder_id"].asUUID(); -    // Add the category to the internal representation -    LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(categoryId, -        result["parent_id"].asUUID(), (LLFolderType::EType)result["type"].asInteger(), -        result["name"].asString(), gAgent.getID()); - -    cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL - 1); // accountForUpdate() will icrease version by 1 -    cat->setDescendentCount(0); -    LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); -     -    accountForUpdate(update); -    updateCategory(cat); +    LLViewerInventoryCategory* folderp = gInventory.getCategory(categoryId); +    if (!folderp) +    { +        // Add the category to the internal representation +        LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(categoryId, +            result["parent_id"].asUUID(), (LLFolderType::EType)result["type"].asInteger(), +            result["name"].asString(), gAgent.getID()); + +        LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); +        accountForUpdate(update); + +        cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL - 1); // accountForUpdate() will icrease version by 1 +        cat->setDescendentCount(0); +        updateCategory(cat); +    } +    else +    { +        // bulk processing was faster than coroutine (coro request->processBulkUpdateInventory->coro response) +        // category already exists, but needs an update +        if (folderp->getVersion() != LLViewerInventoryCategory::VERSION_INITIAL +            || folderp->getDescendentCount() != LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN) +        { +            LL_WARNS() << "Inventory desync on folder creation. Newly created folder already has descendants or got a version.\n" +                << "Name: " << folderp->getName() +                << " Id: " << folderp->getUUID() +                << " Version: " << folderp->getVersion() +                << " Descendants: " << folderp->getDescendentCount() +                << LL_ENDL; +        } +        // Recreate category with correct values +        // Creating it anew just simplifies figuring out needed change-masks +        // and making all needed updates, see updateCategory +        LLPointer<LLViewerInventoryCategory> cat = new LLViewerInventoryCategory(categoryId, +            result["parent_id"].asUUID(), (LLFolderType::EType)result["type"].asInteger(), +            result["name"].asString(), gAgent.getID()); + +        if (folderp->getParentUUID() != cat->getParentUUID()) +        { +            LL_WARNS() << "Inventory desync on folder creation. Newly created folder has wrong parent.\n" +                << "Name: " << folderp->getName() +                << " Id: " << folderp->getUUID() +                << " Expected parent: " << cat->getParentUUID() +                << " Actual parent: " << folderp->getParentUUID() +                << LL_ENDL; +            LLInventoryModel::LLCategoryUpdate update(cat->getParentUUID(), 1); +            accountForUpdate(update); +        } +        // else: Do not update parent, parent is already aware of the change. See processBulkUpdateInventory + +        cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL - 1); // accountForUpdate() will icrease version by 1 +        cat->setDescendentCount(0); +        updateCategory(cat); +    }      if (callback)      { diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 1d76dd7928..0ce513d4a4 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -99,7 +99,7 @@  //     locking actions.  In particular, the following operations  //     on LLMeshRepository are very averse to any stalls:  //     * loadMesh -//     * getMeshHeader (For structural details, see: +//     * search in mMeshHeader (For structural details, see:  //       http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format)  //     * notifyLoadedMeshes  //     * getSkinInfo @@ -3173,7 +3173,6 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b  			header_bytes = (S32)gMeshRepo.mThread->mMeshHeaderSize[mesh_id];  			header = iter->second;  		} -		gMeshRepo.mThread->mHeaderMutex->unlock();  		if (header_bytes > 0  			&& !header.has("404") @@ -3194,7 +3193,10 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b  			lod_bytes = llmax(lod_bytes, header["skin"]["offset"].asInteger() + header["skin"]["size"].asInteger());  			lod_bytes = llmax(lod_bytes, header["physics_convex"]["offset"].asInteger() + header["physics_convex"]["size"].asInteger()); -			S32 header_bytes = (S32) gMeshRepo.mThread->mMeshHeaderSize[mesh_id]; +            // Do not unlock mutex untill we are done with LLSD. +            // LLSD is smart and can work like smart pointer, is not thread safe. +            gMeshRepo.mThread->mHeaderMutex->unlock(); +  			S32 bytes = lod_bytes + header_bytes;  @@ -3230,6 +3232,8 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b  		{  			LL_WARNS(LOG_MESH) << "Trying to cache nonexistent mesh, mesh id: " << mesh_id << LL_ENDL; +			gMeshRepo.mThread->mHeaderMutex->unlock(); +  			// headerReceived() parsed header, but header's data is invalid so none of the LODs will be available  			LLMutexLock lock(gMeshRepo.mThread->mMutex);  			for (int i(0); i < 4; ++i) @@ -4094,42 +4098,42 @@ void LLMeshRepository::buildHull(const LLVolumeParams& params, S32 detail)  bool LLMeshRepository::hasPhysicsShape(const LLUUID& mesh_id)  { -	LLSD mesh = mThread->getMeshHeader(mesh_id); -	if (mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0)) -	{ -		return true; -	} - -	LLModel::Decomposition* decomp = getDecomposition(mesh_id); -	if (decomp && !decomp->mHull.empty()) -	{ -		return true; -	} +    if (mesh_id.isNull()) +    { +        return false; +    } -	return false; -} +    if (mThread->hasPhysicsShapeInHeader(mesh_id)) +    { +        return true; +    } -LLSD& LLMeshRepository::getMeshHeader(const LLUUID& mesh_id) -{ -	LL_RECORD_BLOCK_TIME(FTM_MESH_FETCH); +    LLModel::Decomposition* decomp = getDecomposition(mesh_id); +    if (decomp && !decomp->mHull.empty()) +    { +        return true; +    } -	return mThread->getMeshHeader(mesh_id); +    return false;  } -LLSD& LLMeshRepoThread::getMeshHeader(const LLUUID& mesh_id) +bool LLMeshRepoThread::hasPhysicsShapeInHeader(const LLUUID& mesh_id)  { -	static LLSD dummy_ret; -	if (mesh_id.notNull()) -	{ -		LLMutexLock lock(mHeaderMutex); -		mesh_header_map::iterator iter = mMeshHeader.find(mesh_id); -		if (iter != mMeshHeader.end() && mMeshHeaderSize[mesh_id] > 0) -		{ -			return iter->second; -		} -	} +    LLMutexLock lock(mHeaderMutex); +    if (mMeshHeaderSize[mesh_id] > 0) +    { +        mesh_header_map::iterator iter = mMeshHeader.find(mesh_id); +        if (iter != mMeshHeader.end()) +        { +            LLSD &mesh = iter->second; +            if (mesh.has("physics_mesh") && mesh["physics_mesh"].has("size") && (mesh["physics_mesh"]["size"].asInteger() > 0)) +            { +                return true; +            } +        } +    } -	return dummy_ret; +    return false;  } diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index bba0c9f2cb..59ca4db51e 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -341,7 +341,7 @@ public:  	bool skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 data_size);  	bool decompositionReceived(const LLUUID& mesh_id, U8* data, S32 data_size);  	bool physicsShapeReceived(const LLUUID& mesh_id, U8* data, S32 data_size); -	LLSD& getMeshHeader(const LLUUID& mesh_id); +	bool hasPhysicsShapeInHeader(const LLUUID& mesh_id);  	void notifyLoadedMeshes();  	S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod); @@ -593,9 +593,6 @@ public:  	bool meshUploadEnabled();  	bool meshRezEnabled(); -	 - -	LLSD& getMeshHeader(const LLUUID& mesh_id);  	void uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,                       bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position, diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 224cec9650..65d7aac7d6 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -684,7 +684,6 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,  		if (LLPanelLogin::sInstance->mPasswordModified)  		{ -			authenticator = LLSD::emptyMap();  			// password is plaintext  			authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR;  			authenticator["secret"] = password; @@ -695,6 +694,15 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,              if (credential.notNull())              {                  authenticator = credential->getAuthenticator(); +                if (authenticator.emptyMap()) +                { +                    // Likely caused by user trying to log in to non-system grid +                    // with unsupported name format, just retry +                    LL_WARNS() << "Authenticator failed to load for: " << username << LL_ENDL; +                    // password is plaintext +                    authenticator["type"] = CRED_AUTHENTICATOR_TYPE_CLEAR; +                    authenticator["secret"] = password; +                }              }          }  	} diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp index 72d7cf1e45..fe14f2b495 100644 --- a/indra/newview/llsecapi.cpp +++ b/indra/newview/llsecapi.cpp @@ -117,7 +117,7 @@ LLSD LLCredential::getLoginParams()  		else if (mIdentifier["type"].asString() == "account")  		{  			result["username"] = mIdentifier["account_name"]; -			result["passwd"] = mAuthenticator["secret"]; +			result["passwd"] = mAuthenticator["secret"].asString();  			username = result["username"].asString();  		}  	} diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 61a23851ed..a9d70d0f97 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -10253,7 +10253,7 @@ Unable to add script!     name="AssetServerTimeoutObjReturn"     type="notify">     <tag>fail</tag> -Asset server didn't respond in a timely fashion.  Object returned to sim. +Asset server didn't respond in a timely fashion.  Object returned to the region.    </notification>    <notification | 
