From bde7cd91130ee91993f6b42863ac7ab6430bafd6 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Mon, 16 May 2011 17:39:42 -0400
Subject: [PATCH] sh-1491 WIP

---
 indra/newview/llmeshrepository.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 653fb467540..7d484162927 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -84,7 +84,7 @@ U32 LLMeshRepository::sPeakKbps = 0;
 
 const U32 MAX_TEXTURE_UPLOAD_RETRIES = 5;
 
-void dumpLLSDToFile(LLSD& content, std::string filename);
+void dumpLLSDToFile(const LLSD& content, std::string filename);
 
 std::string header_lod[] = 
 {
@@ -490,20 +490,13 @@ class LLWholeModelFeeResponder: public LLCurl::Responder
 		mThread(thread)
 	{
 	}
-	virtual void completedRaw(U32 status, const std::string& reason,
-							  const LLChannelDescriptors& channels,
-							  const LLIOPipe::buffer_ptr_t& buffer)
+	virtual void completed(U32 status,
+						   const std::string& reason,
+						   const LLSD& content)
 	{
 		//assert_main_thread();
 		llinfos << "completed" << llendl;
 		mThread->mPendingUploads--;
-
-		LLSD content;
-		LLBufferStream istr(channels, buffer.get());
-		if (!LLSDSerialize::fromXML(content, istr))
-		{
-			llinfos << "Failed to deserialize LLSD. " << " [" << status << "]: " << reason << llendl;
-		}
 		dumpLLSDToFile(content,"whole_model_response.xml");
 	}
 };
@@ -1372,7 +1365,7 @@ void LLMeshUploadThread::run()
 }
 
 #if 1
-void dumpLLSDToFile(LLSD& content, std::string filename)
+void dumpLLSDToFile(const LLSD& content, std::string filename)
 {
 	std::ofstream of(filename);
 	LLSDSerialize::toPrettyXML(content,of);
@@ -1562,6 +1555,9 @@ void LLMeshUploadThread::doWholeModelUpload()
 		mCurlRequest->process();
 	} while (mCurlRequest->getQueued() > 0);
 
+	delete mCurlRequest;
+	mCurlRequest = NULL;
+
 	// Currently a no-op.
 	mFinished = true;
 }
-- 
GitLab