summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llmeshrepository.cpp65
1 files changed, 59 insertions, 6 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 8e5d132096..111802cd47 100644..100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -468,6 +468,49 @@ public:
};
+void log_upload_error(const LLSD& content,std::string stage)
+{
+ if (content.has("error"))
+ {
+ const LLSD& err = content["error"];
+ llwarns << "mesh upload failed, stage " << stage
+ << " message " << err["message"].asString() << " id " << err["identifier"].asString()
+ << llendl;
+
+ if (content.has("errors"))
+ {
+ const LLSD& err_list = content["errors"];
+ for (LLSD::array_const_iterator it = err_list.beginArray();
+ it != err_list.endArray();
+ ++it)
+ {
+ const LLSD& err_entry = *it;
+ std::string index_info;
+ std::string texture_index_str = err_entry["TextureIndex"].asString();
+ if (!texture_index_str.empty())
+ {
+ index_info += " texture_index: " + texture_index_str;
+ }
+ std::string mesh_index_str = err_entry["MeshIndex"].asString();
+ if (!mesh_index_str.empty())
+ {
+ index_info += " mesh_index: " + mesh_index_str;
+ }
+ llwarns << "mesh err code " << err_entry["error"].asString()
+ << " message " << err_entry["message"]
+ << index_info
+ << llendl;
+ }
+ }
+ }
+ else
+ {
+ llwarns << "bad mesh, no error information available" << llendl;
+ }
+
+
+}
+
class LLModelObjectUploadResponder: public LLCurl::Responder
{
LLSD mObjectAsset;
@@ -511,15 +554,17 @@ public:
llinfos << "LLWholeModelFeeResponder content: " << content << llendl;
if (isGoodStatus(status))
{
+ llinfos << "fee request succeeded" << llendl;
mThread->mWholeModelUploadURL = content["uploader"].asString();
}
else
{
- llinfos << "upload failed" << llendl;
+ llwarns << "fee request failed" << llendl;
+ log_upload_error(content,"fee");
mThread->mWholeModelUploadURL = "";
}
-
}
+
};
class LLWholeModelUploadResponder: public LLCurl::Responder
@@ -538,13 +583,21 @@ public:
const LLSD& content)
{
//assert_main_thread();
- llinfos << "upload completed" << llendl;
mThread->mPendingUploads--;
dumpLLSDToFile(content,make_dump_name("whole_model_upload_response_",dump_num));
// requested "mesh" asset type isn't actually the type
// of the resultant object, fix it up here.
- mPostData["asset_type"] = "object";
- gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mPostData,content));
+ if (isGoodStatus(status))
+ {
+ llinfos << "upload succeeded" << llendl;
+ mPostData["asset_type"] = "object";
+ gMeshRepo.updateInventory(LLMeshRepository::inventory_data(mPostData,content));
+ }
+ else
+ {
+ llwarns << "upload failed" << llendl;
+ log_upload_error(content,"upload");
+ }
}
};
@@ -1533,7 +1586,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
face_entry["offsett"] = 0.0;
face_entry["imagerot"] = 0.0;
}
- face_entry["colors"] = ll_sd_from_color4(material.mDiffuseColor);
+ face_entry["diffuse_color"] = ll_sd_from_color4(material.mDiffuseColor);
face_entry["fullbright"] = material.mFullbright;
instance_entry["face_list"][face_num] = face_entry;
}