diff options
author | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2022-12-07 02:16:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 02:16:12 +0200 |
commit | c69c8aa347363bc51ed256523bc368d4584dbfd1 (patch) | |
tree | 8e60dd7e471a00634452189f85d67b3901e52136 /indra/newview/llviewerassetupload.h | |
parent | c033278ec2d16181b94d6433a3353765c8981850 (diff) |
SL-18777 PBR upload was stuck waiting for texture
Handle obscure upload failure case - floater was waiting for a texture upload indefinetely.
Unblock floater if upload fails.
Diffstat (limited to 'indra/newview/llviewerassetupload.h')
-rw-r--r-- | indra/newview/llviewerassetupload.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index 9eddcfbd0e..7f7707f5bb 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -64,6 +64,9 @@ public: virtual void logPreparedUpload(); virtual LLUUID finishUpload(LLSD &result); + // return true if no further action is need + virtual bool failedUpload(LLSD &result, std::string &reason) { return false; } + LLTransactionID getTransactionId() const { return mTransactionId; } LLAssetType::EType getAssetType() const { return mAssetType; } std::string getAssetTypeString() const; @@ -173,6 +176,7 @@ class LLNewBufferedResourceUploadInfo : public LLResourceUploadInfo { public: typedef std::function<void(LLUUID newAssetId, LLSD response)> uploadFinish_f; + typedef std::function<bool(LLUUID assetId, LLSD response, std::string reason)> uploadFailure_f; LLNewBufferedResourceUploadInfo( const std::string& buffer, @@ -188,7 +192,8 @@ public: U32 everyonePerms, S32 expectedCost, bool show_inventory, - uploadFinish_f finish); + uploadFinish_f finish, + uploadFailure_f failure); virtual LLSD prepareUpload(); @@ -196,9 +201,11 @@ protected: virtual LLSD exportTempFile(); virtual LLUUID finishUpload(LLSD &result); + virtual bool failedUpload(LLSD &result, std::string &reason); private: uploadFinish_f mFinishFn; + uploadFailure_f mFailureFn; std::string mBuffer; }; @@ -208,14 +215,16 @@ class LLBufferedAssetUploadInfo : public LLResourceUploadInfo public: typedef std::function<void(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId, LLSD response)> invnUploadFinish_f; typedef std::function<void(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response)> taskUploadFinish_f; + typedef std::function<bool(LLUUID itemId, LLUUID taskId, LLSD response, std::string reason)> uploadFailed_f; - LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType::EType assetType, std::string buffer, invnUploadFinish_f finish); + LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType::EType assetType, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed); LLBufferedAssetUploadInfo(LLUUID itemId, LLPointer<LLImageFormatted> image, invnUploadFinish_f finish); - LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemId, LLAssetType::EType assetType, std::string buffer, taskUploadFinish_f finish); + LLBufferedAssetUploadInfo(LLUUID taskId, LLUUID itemId, LLAssetType::EType assetType, std::string buffer, taskUploadFinish_f finish, uploadFailed_f failed); virtual LLSD prepareUpload(); virtual LLSD generatePostBody(); virtual LLUUID finishUpload(LLSD &result); + virtual bool failedUpload(LLSD &result, std::string &reason); LLUUID getTaskId() const { return mTaskId; } const std::string & getContents() const { return mContents; } @@ -232,6 +241,7 @@ private: std::string mContents; invnUploadFinish_f mInvnFinishFn; taskUploadFinish_f mTaskFinishFn; + uploadFailed_f mFailureFn; bool mStoredToCache; }; @@ -245,9 +255,9 @@ public: MONO }; - LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish); + LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed); LLScriptAssetUpload(LLUUID taskId, LLUUID itemId, TargetType_t targetType, - bool isRunning, LLUUID exerienceId, std::string buffer, taskUploadFinish_f finish); + bool isRunning, LLUUID exerienceId, std::string buffer, taskUploadFinish_f finish, uploadFailed_f failed); virtual LLSD generatePostBody(); |