diff options
author | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
commit | 80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch) | |
tree | da3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/newview/llmeshrepository.cpp | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
parent | 2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff) |
merge from viewer-release
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 107 |
1 files changed, 53 insertions, 54 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 2e02805c02..77ea965136 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -27,8 +27,7 @@ #include "llviewerprecompiledheaders.h" -#include "apr_pools.h" -#include "apr_dso.h" +#include "llapr.h" #include "llhttpstatuscodes.h" #include "llmeshrepository.h" @@ -220,7 +219,7 @@ public: { if (!mProcessed) { //something went wrong, retry - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -259,7 +258,7 @@ public: { if (!mProcessed) { - llwarns << "Killed without being processed, retrying." << llendl; + LL_WARNS() << "Killed without being processed, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->lockAndLoadMeshLOD(mMeshParams, mLOD); } @@ -293,7 +292,7 @@ public: !mProcessed && mMeshID.notNull()) { // Something went wrong, retry - llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } @@ -325,7 +324,7 @@ public: !mProcessed && mMeshID.notNull()) { // Something went wrong, retry - llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } @@ -357,7 +356,7 @@ public: !mProcessed && mMeshID.notNull()) { // Something went wrong, retry - llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } @@ -381,16 +380,16 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s gMeshRepo.uploadError(args); // Log details. - llwarns << "stage: " << stage << " http status: " << status << llendl; + LL_WARNS() << "stage: " << stage << " http status: " << status << LL_ENDL; if (content.has("error")) { const LLSD& err = content["error"]; - llwarns << "err: " << err << llendl; - llwarns << "mesh upload failed, stage '" << stage + LL_WARNS() << "err: " << err << LL_ENDL; + LL_WARNS() << "mesh upload failed, stage '" << stage << "' error '" << err["error"].asString() << "', message '" << err["message"].asString() << "', id '" << err["identifier"].asString() - << "'" << llendl; + << "'" << LL_ENDL; if (err.has("errors")) { S32 error_num = 0; @@ -400,13 +399,13 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s ++it) { const LLSD& err_entry = *it; - llwarns << "error[" << error_num << "]:" << llendl; + LL_WARNS() << "error[" << error_num << "]:" << LL_ENDL; for (LLSD::map_const_iterator map_it = err_entry.beginMap(); map_it != err_entry.endMap(); ++map_it) { - llwarns << "\t" << map_it->first << ": " - << map_it->second << llendl; + LL_WARNS() << "\t" << map_it->first << ": " + << map_it->second << LL_ENDL; } error_num++; } @@ -414,7 +413,7 @@ void log_upload_error(S32 status, const LLSD& content, std::string stage, std::s } else { - llwarns << "bad mesh, no error information available" << llendl; + LL_WARNS() << "bad mesh, no error information available" << LL_ENDL; } } @@ -470,7 +469,7 @@ public: } else { - llwarns << "fee request failed" << llendl; + LL_WARNS() << "fee request failed" << LL_ENDL; log_upload_error(status,cc,"fee",mModelData["name"]); mThread->mWholeModelUploadURL = ""; @@ -538,7 +537,7 @@ public: } else { - llwarns << "upload failed" << llendl; + LL_WARNS() << "upload failed" << LL_ENDL; std::string model_name = mModelData["name"].asString(); log_upload_error(status,cc,"upload",model_name); @@ -575,7 +574,7 @@ void LLMeshRepoThread::run() LLCDResult res = LLConvexDecomposition::initThread(); if (res != LLCD_OK) { - llwarns << "convex decomposition unable to be loaded" << llendl; + LL_WARNS() << "convex decomposition unable to be loaded" << LL_ENDL; } while (!LLApp::isQuitting()) @@ -684,7 +683,7 @@ void LLMeshRepoThread::run() res = LLConvexDecomposition::quitThread(); if (res != LLCD_OK) { - llwarns << "convex decomposition unable to be quit" << llendl; + LL_WARNS() << "convex decomposition unable to be quit" << LL_ENDL; } delete mCurlRequest; @@ -764,7 +763,7 @@ std::string LLMeshRepoThread::constructUrl(LLUUID mesh_id) } else { - llwarns << "Current region does not have GetMesh capability! Cannot load " << mesh_id << ".mesh" << llendl; + LL_WARNS() << "Current region does not have GetMesh capability! Cannot load " << mesh_id << ".mesh" << LL_ENDL; } return http_url; @@ -1202,7 +1201,7 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat if (!LLSDSerialize::fromBinary(header, stream, data_size)) { - llwarns << "Mesh header parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL; return false; } @@ -1210,8 +1209,8 @@ bool LLMeshRepoThread::headerReceived(const LLVolumeParams& mesh_params, U8* dat } else { - llinfos - << "Marking header as non-existent, will not retry." << llendl; + LL_INFOS() + << "Marking header as non-existent, will not retry." << LL_ENDL; header["404"] = 1; } @@ -1277,7 +1276,7 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat if (!unzip_llsd(skin, stream, data_size)) { - llwarns << "Mesh skin info parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh skin info parse error. Not a valid mesh asset!" << LL_ENDL; return false; } } @@ -1286,7 +1285,7 @@ bool LLMeshRepoThread::skinInfoReceived(const LLUUID& mesh_id, U8* data, S32 dat LLMeshSkinInfo info(skin); info.mMeshID = mesh_id; - //llinfos<<"info pelvis offset"<<info.mPelvisOffset<<llendl; + //LL_INFOS()<<"info pelvis offset"<<info.mPelvisOffset<<LL_ENDL; mSkinInfoQ.push(info); } @@ -1305,7 +1304,7 @@ bool LLMeshRepoThread::decompositionReceived(const LLUUID& mesh_id, U8* data, S3 if (!unzip_llsd(decomp, stream, data_size)) { - llwarns << "Mesh decomposition parse error. Not a valid mesh asset!" << llendl; + LL_WARNS() << "Mesh decomposition parse error. Not a valid mesh asset!" << LL_ENDL; return false; } } @@ -1721,7 +1720,7 @@ void LLMeshUploadThread::doWholeModelUpload() if (mWholeModelUploadURL.empty()) { - llinfos << "unable to upload, fee request failed" << llendl; + LL_INFOS() << "unable to upload, fee request failed" << LL_ENDL; } else { @@ -1935,21 +1934,21 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason, if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD); } else { llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -1999,21 +1998,21 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshSkinInfo(mMeshID); } else { llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2062,21 +2061,21 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshDecomposition(mMeshID); } else { llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2126,21 +2125,21 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re if (status < 200 || status > 400) { - llwarns << status << ": " << reason << llendl; + LL_WARNS() << status << ": " << reason << LL_ENDL; } if (data_size < mRequestedBytes) { if (status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE) { //timeout or service unavailable, try again - llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID); } else { llassert(status == HTTP_INTERNAL_ERROR || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint - llwarns << "Unhandled status " << status << llendl; + LL_WARNS() << "Unhandled status " << status << LL_ENDL; } return; } @@ -2188,9 +2187,9 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (status < 200 || status > 400) { - //llwarns + //LL_WARNS() // << "Header responder failed with status: " - // << status << ": " << reason << llendl; + // << status << ": " << reason << LL_ENDL; // 503 (service unavailable) or 499 (internal Linden-generated error) // can be due to server load and can be retried @@ -2203,7 +2202,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || status == HTTP_INTERNAL_ERROR) { //retry - llwarns << "Timeout or service unavailable, retrying." << llendl; + LL_WARNS() << "Timeout or service unavailable, retrying." << LL_ENDL; LLMeshRepository::sHTTPRetryCount++; LLMeshRepoThread::HeaderRequest req(mMeshParams); LLMutexLock lock(gMeshRepo.mThread->mMutex); @@ -2213,7 +2212,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, } else { - llwarns << "Unhandled status: " << status << llendl; + LL_WARNS() << "Unhandled status: " << status << LL_ENDL; } } @@ -2235,9 +2234,9 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason, if (!success) { - llwarns + LL_WARNS() << "Unable to parse mesh header: " - << status << ": " << reason << llendl; + << status << ": " << reason << LL_ENDL; } else if (data && data_size > 0) { @@ -2331,11 +2330,11 @@ void LLMeshRepository::init() void LLMeshRepository::shutdown() { - llinfos << "Shutting down mesh repository." << llendl; + LL_INFOS() << "Shutting down mesh repository." << LL_ENDL; for (U32 i = 0; i < mUploads.size(); ++i) { - llinfos << "Discard the pending mesh uploads " << llendl; + LL_INFOS() << "Discard the pending mesh uploads " << LL_ENDL; mUploads[i]->discard() ; //discard the uploading requests. } @@ -2350,7 +2349,7 @@ void LLMeshRepository::shutdown() for (U32 i = 0; i < mUploads.size(); ++i) { - llinfos << "Waiting for pending mesh upload " << i << "/" << mUploads.size() << llendl; + LL_INFOS() << "Waiting for pending mesh upload " << i << "/" << mUploads.size() << LL_ENDL; while (!mUploads[i]->isStopped()) { apr_sleep(10); @@ -2363,7 +2362,7 @@ void LLMeshRepository::shutdown() delete mMeshMutex; mMeshMutex = NULL; - llinfos << "Shutting down decomposition system." << llendl; + LL_INFOS() << "Shutting down decomposition system." << LL_ENDL; if (mDecompThread) { @@ -2709,7 +2708,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol //make sure target volume is still valid if (volume->getNumVolumeFaces() <= 0) { - llwarns << "Mesh loading returned empty volume." << llendl; + LL_WARNS() << "Mesh loading returned empty volume." << LL_ENDL; } { //update system volume @@ -2722,7 +2721,7 @@ void LLMeshRepository::notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVol } else { - llwarns << "Couldn't find system volume for given mesh." << llendl; + LL_WARNS() << "Couldn't find system volume for given mesh." << LL_ENDL; } } @@ -3206,7 +3205,7 @@ void LLPhysicsDecomp::setMeshData(LLCDMeshData& mesh, bool vertex_based) if (ret) { - llerrs << "Convex Decomposition thread valid but could not set mesh data" << llendl; + LL_ERRS() << "Convex Decomposition thread valid but could not set mesh data" << LL_ENDL; } } } @@ -3282,7 +3281,7 @@ void LLPhysicsDecomp::doDecomposition() if (ret) { - llwarns << "Convex Decomposition thread valid but could not execute stage " << stage << llendl; + LL_WARNS() << "Convex Decomposition thread valid but could not execute stage " << stage << LL_ENDL; LLMutexLock lock(mMutex); mCurRequest->mHull.clear(); @@ -3413,7 +3412,7 @@ void LLPhysicsDecomp::doDecompositionSingleHull() LLCDResult ret = decomp->buildSingleHull() ; if(ret) { - llwarns << "Could not execute decomposition stage when attempting to create single hull." << llendl; + LL_WARNS() << "Could not execute decomposition stage when attempting to create single hull." << LL_ENDL; make_box(mCurRequest); } else |