MAINT-8399 fixed unnessesary spam and made message more informative

Fri, 16 Mar 2018 18:04:48 +0200

author
andreykproductengine <andreykproductengine@lindenlab.com>
date
Fri, 16 Mar 2018 18:04:48 +0200
changeset 55345
203d3d3dc054
parent 55344
2a5301c64f44
child 55346
d1b2f4143da9

MAINT-8399 fixed unnessesary spam and made message more informative

indra/newview/llmeshrepository.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llmeshrepository.cpp	Fri Mar 16 16:45:25 2018 +0200
     1.2 +++ b/indra/newview/llmeshrepository.cpp	Fri Mar 16 18:04:48 2018 +0200
     1.3 @@ -1118,19 +1118,27 @@
     1.4  	
     1.5  	if (gAgent.getRegion())
     1.6  	{
     1.7 -		LLMutexLock lock(mMutex);
     1.8 -        res_url = mGetMeshCapability;
     1.9 -	}
    1.10 -
    1.11 -	if (! res_url.empty())
    1.12 -	{
    1.13 -		res_url += "/?mesh_id=";
    1.14 -		res_url += mesh_id.asString().c_str();
    1.15 +		{
    1.16 +			LLMutexLock lock(mMutex);
    1.17 +			res_url = mGetMeshCapability;
    1.18 +		}
    1.19 +
    1.20 +		if (!res_url.empty())
    1.21 +		{
    1.22 +			res_url += "/?mesh_id=";
    1.23 +			res_url += mesh_id.asString().c_str();
    1.24 +		}
    1.25 +		else
    1.26 +		{
    1.27 +			LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability!  Cannot load meshes. Region id: "
    1.28 +									<< gAgent.getRegion()->getRegionID() << LL_ENDL;
    1.29 +			LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
    1.30 +		}
    1.31  	}
    1.32  	else
    1.33  	{
    1.34 -		LL_WARNS_ONCE(LOG_MESH) << "Current region does not have ViewerAsset capability!  Cannot load "
    1.35 -								<< mesh_id << ".mesh" << LL_ENDL;
    1.36 +		LL_WARNS_ONCE(LOG_MESH) << "Current region is not loaded so there is no capability to load from! Cannot load meshes." << LL_ENDL;
    1.37 +		LL_DEBUGS_ONCE(LOG_MESH) << "Cannot load mesh " << mesh_id << " due to missing capability." << LL_ENDL;
    1.38  	}
    1.39  
    1.40  	*url = res_url;

mercurial