summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 23a908c0ff..131bef6958 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -50,6 +50,7 @@
#include "llviewerregion.h"
#include "llwearablelist.h"
#include "llsdutil.h"
+#include "llsdserialize.h"
std::string self_av_string()
{
@@ -3045,6 +3046,10 @@ public:
if (content["success"].asBoolean())
{
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
+ if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+ {
+ dumpContents("appearance_request_ok", content);
+ }
}
else
{
@@ -3052,11 +3057,23 @@ public:
}
}
+ void dumpContents(const std::string outprefix, const LLSD& content)
+ {
+ std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
+ std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
+ std::ofstream ofs(fullpath);
+ ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY);
+ LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL;
+ }
+
// Error
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
- llwarns << "appearance update request failed, status: " << status << " reason: " << reason << llendl;
- LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
+ llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl;
+ if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+ {
+ dumpContents("appearance_request_error", content);
+ }
onFailure(status);
}
@@ -3091,6 +3108,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
if (!gAgent.getRegion())
{
llwarns << "Region not set, cannot request server appearance update" << llendl;
+ return;
}
if (gAgent.getRegion()->getCentralBakeVersion()==0)
{
@@ -3106,7 +3124,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
LLSD body;
S32 cof_version = getCOFVersion();
body["cof_version"] = cof_version;
- LL_DEBUGS("Avatar") << "my_cof_version " << cof_version << llendl;
+ LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
//LLCurl::ResponderPtr responder_ptr;
if (!responder_ptr.get())