summaryrefslogtreecommitdiff
path: root/indra/newview/llassetuploadqueue.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-06-17 13:09:15 -0700
committerdolphin <dolphin@lindenlab.com>2014-06-17 13:09:15 -0700
commit299921de323eb9b6844cd7b6f6b8da3490ee3747 (patch)
treedcb4c5c257622c20014a0b986dc8e2d1c25a10c7 /indra/newview/llassetuploadqueue.cpp
parent89ea1cbc7acee8878c36a5795dd3df12a913c513 (diff)
parent977476171ddcc057d7c28b6c14ae988b8189ed75 (diff)
Merge with 3.7.9-release
Diffstat (limited to 'indra/newview/llassetuploadqueue.cpp')
-rwxr-xr-xindra/newview/llassetuploadqueue.cpp83
1 files changed, 43 insertions, 40 deletions
diff --git a/indra/newview/llassetuploadqueue.cpp b/indra/newview/llassetuploadqueue.cpp
index 1b72a077fb..359ee1e221 100755
--- a/indra/newview/llassetuploadqueue.cpp
+++ b/indra/newview/llassetuploadqueue.cpp
@@ -36,6 +36,7 @@
class LLAssetUploadChainResponder : public LLUpdateTaskInventoryResponder
{
+ LOG_CLASS(LLAssetUploadChainResponder);
public:
LLAssetUploadChainResponder(const LLSD& post_data,
@@ -51,52 +52,54 @@ public:
mDataSize(data_size),
mScriptName(script_name)
{
- }
+ }
virtual ~LLAssetUploadChainResponder()
- {
- if(mSupplier)
- {
- LLAssetUploadQueue *queue = mSupplier->get();
- if (queue)
- {
- // Give ownership of supplier back to queue.
- queue->mSupplier = mSupplier;
- mSupplier = NULL;
- }
- }
- delete mSupplier;
+ {
+ if(mSupplier)
+ {
+ LLAssetUploadQueue *queue = mSupplier->get();
+ if (queue)
+ {
+ // Give ownership of supplier back to queue.
+ queue->mSupplier = mSupplier;
+ mSupplier = NULL;
+ }
+ }
+ delete mSupplier;
delete mData;
- }
+ }
- virtual void errorWithContent(U32 statusNum, const std::string& reason, const LLSD& content)
- {
- LL_WARNS() << "LLAssetUploadChainResponder Error [status:"
- << statusNum << "]: " << content << LL_ENDL;
- LLUpdateTaskInventoryResponder::errorWithContent(statusNum, reason, content);
- LLAssetUploadQueue *queue = mSupplier->get();
- if (queue)
+protected:
+ virtual void httpFailure()
+ {
+ // Parent class will spam the failure.
+ //LL_WARNS() << dumpResponse() << LL_ENDL;
+ LLUpdateTaskInventoryResponder::httpFailure();
+ LLAssetUploadQueue *queue = mSupplier->get();
+ if (queue)
+ {
+ queue->request(&mSupplier);
+ }
+ }
+
+ virtual void httpSuccess()
+ {
+ LLUpdateTaskInventoryResponder::httpSuccess();
+ LLAssetUploadQueue *queue = mSupplier->get();
+ if (queue)
{
- queue->request(&mSupplier);
- }
- }
-
- virtual void result(const LLSD& content)
- {
- LLUpdateTaskInventoryResponder::result(content);
- LLAssetUploadQueue *queue = mSupplier->get();
- if (queue)
- {
- // Responder is reused across 2 phase upload,
- // so only start next upload after 2nd phase complete.
- std::string state = content["state"];
- if(state == "complete")
- {
- queue->request(&mSupplier);
- }
- }
- }
+ // Responder is reused across 2 phase upload,
+ // so only start next upload after 2nd phase complete.
+ const std::string& state = getContent()["state"].asStringRef();
+ if(state == "complete")
+ {
+ queue->request(&mSupplier);
+ }
+ }
+ }
+public:
virtual void uploadUpload(const LLSD& content)
{
std::string uploader = content["uploader"];