summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-10-17 15:33:20 -0500
committerDave Parks <davep@lindenlab.com>2012-10-17 15:33:20 -0500
commit2e30d652104859453e066e15431b59ee6f8bf182 (patch)
treea4f814247a3b1aa15b9739defa413e11bf480923
parent4d807ba638cea8898beed5ca8e7e1951adb962bb (diff)
parent378e9528d440470aab819be46392cec8b3a44563 (diff)
Automated merge with https://bitbucket.org/lindenlab/viewer-cat
-rw-r--r--doc/contributions.txt4
-rwxr-xr-xindra/newview/llmeshrepository.cpp33
-rw-r--r--indra/newview/llmeshrepository.h3
3 files changed, 35 insertions, 5 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 43de729bff..d29d7ce464 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 Perian
OPEN-1
STORM-1087
@@ -1243,6 +1246,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 bc7f522848..57a5569dd7 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();
@@ -1620,7 +1644,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;
@@ -1642,7 +1666,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;
{
@@ -1659,7 +1682,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();