diff options
author | Dave Parks <davep@lindenlab.com> | 2011-05-04 12:55:06 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-05-04 12:55:06 -0500 |
commit | bce7b4f0980c3d5e8697a48487721097d732e9f3 (patch) | |
tree | 50978c11562693daaeaae8330894e7c02dc99412 /indra/newview/llmeshrepository.cpp | |
parent | 8245e381cb1657cbfcf434659b4aaa6cd155a3ae (diff) | |
parent | 0be3b1fdd9821929fc537e1c812f26268979dbf0 (diff) |
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-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 --- 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) |