diff options
author | Dave Parks <davep@lindenlab.com> | 2012-10-17 15:33:01 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-10-17 15:33:01 -0500 |
commit | 2fd843c11884ea7543544d5f33bc7030655b7382 (patch) | |
tree | b37865a3bc4e107844c876a7138dae4dce82febe | |
parent | 9db74ae962ad0c8864f8b236bed0bb503b0e96e1 (diff) |
MAINT-873 Fix for inability to upload meshes on some systems.
-rw-r--r-- | doc/contributions.txt | 4 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.h | 3 |
3 files changed, 35 insertions, 5 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index 3a543db173..f53d9f5cfd 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -321,6 +321,7 @@ Dale Glass VWR-1358 VWR-2041 Darien Caldwell + SH-3055 Dartagan Shepherd Debs Regent Decro Schmooz @@ -890,6 +891,8 @@ Nicholaz Beresford VWR-2682 VWR-2684 Nick Rhodes +NickyD + MAINT-873 Nicky Dasmijn VWR-29228 Nicky Perian @@ -1246,6 +1249,7 @@ Westley Streeter Whimsy Winx Whirly Fizzle STORM-1895 + MAINT-873 Whoops Babii VWR-631 VWR-1640 diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index ba0a590910..92ac435f08 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -361,7 +361,20 @@ public: mModelData(model_data), mObserverHandle(observer_handle) { + if (mThread) + { + mThread->startRequest(); + } + } + + ~LLWholeModelFeeResponder() + { + if (mThread) + { + mThread->stopRequest(); + } } + virtual void completed(U32 status, const std::string& reason, const LLSD& content) @@ -372,7 +385,6 @@ public: cc = llsd_from_file("fake_upload_error.xml"); } - mThread->mPendingUploads--; dump_llsd_to_file(cc,make_dump_name("whole_model_fee_response_",dump_num)); LLWholeModelFeeObserver* observer = mObserverHandle.get(); @@ -415,7 +427,20 @@ public: mModelData(model_data), mObserverHandle(observer_handle) { + if (mThread) + { + mThread->startRequest(); + } + } + + ~LLWholeModelUploadResponder() + { + if (mThread) + { + mThread->stopRequest(); + } } + virtual void completed(U32 status, const std::string& reason, const LLSD& content) @@ -426,7 +451,6 @@ public: cc = llsd_from_file("fake_upload_error.xml"); } - mThread->mPendingUploads--; dump_llsd_to_file(cc,make_dump_name("whole_model_upload_response_",dump_num)); LLWholeModelUploadObserver* observer = mObserverHandle.get(); @@ -1622,7 +1646,7 @@ void LLMeshUploadThread::doWholeModelUpload() mCurlRequest->process(); //sleep for 10ms to prevent eating a whole core apr_sleep(10000); - } while (!LLAppViewer::isQuitting() && mCurlRequest->getQueued() > 0); + } while (!LLAppViewer::isQuitting() && mPendingUploads > 0); } delete mCurlRequest; @@ -1644,7 +1668,6 @@ void LLMeshUploadThread::requestWholeModelFee() wholeModelToLLSD(model_data,false); dump_llsd_to_file(model_data,make_dump_name("whole_model_fee_request_",dump_num)); - mPendingUploads++; LLCurlRequest::headers_t headers; { @@ -1661,7 +1684,7 @@ void LLMeshUploadThread::requestWholeModelFee() mCurlRequest->process(); //sleep for 10ms to prevent eating a whole core apr_sleep(10000); - } while (!LLApp::isQuitting() && mCurlRequest->getQueued() > 0); + } while (!LLApp::isQuitting() && mPendingUploads > 0); delete mCurlRequest; mCurlRequest = NULL; diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index da81bb057b..6e301c26a2 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -405,6 +405,9 @@ public: LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>())); ~LLMeshUploadThread(); + void startRequest() { ++mPendingUploads; } + void stopRequest() { --mPendingUploads; } + bool finished() { return mFinished; } virtual void run(); void preStart(); |