diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-05-02 10:39:18 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-05-02 10:39:18 -0400 |
commit | 50caebbad7f2e8f743b6a08831df2e525e8e6baa (patch) | |
tree | 34ce99a63b37b39311a10043a789c8f83d33a479 /indra/newview/llmeshrepository.cpp | |
parent | 764412f9b5e8d69950f9866a60299b1b458339c6 (diff) |
Added handler for final mesh object upload
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llmeshrepository.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index e20e918a2a..dd2ffdf7f1 100644..100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -454,6 +454,29 @@ public: }; +class LLModelObjectUploadResponder: public LLCurl::Responder +{ + LLSD mObjectAsset; + LLMeshUploadThread* mThread; + +public: + LLModelObjectUploadResponder(LLMeshUploadThread* thread, const LLSD& object_asset): + mThread(thread), + mObjectAsset(object_asset) + { + } + + virtual void completedRaw(U32 status, const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + assert_main_thread(); + + llinfos << "completed" << llendl; + mThread->mPendingUploads--; + mThread->mFinished = true; + } +}; LLMeshRepoThread::LLMeshRepoThread() : LLThread("mesh repo", NULL) @@ -1467,10 +1490,13 @@ void LLMeshUploadThread::run() if(!isDiscarded()) { - LLHTTPClient::post(url, object_asset, new LLHTTPClient::Responder()); + mPendingUploads++; + LLHTTPClient::post(url, object_asset, new LLModelObjectUploadResponder(this,object_asset)); + } + else + { + mFinished = true; } - - mFinished = true; } void LLMeshUploadThread::uploadModel(LLMeshUploadData& data) |