summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-02-27 11:38:12 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-02-27 11:38:12 -0500
commitd9d5c7e0ccec47d57743304c800c5137dd50aa22 (patch)
tree6fac251ae7570afdd602c9361fe687442a07aa5e /indra
parent26ac1097729ce801e61523e3e42d7a868ddcde13 (diff)
SH-3899 WIP - more verbose logging of appearance request status, debug option to force failures for testing
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llappearancemgr.cpp41
2 files changed, 34 insertions, 18 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5db8d4e6a1..826a79b455 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1982,6 +1982,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>DebugForceAppearanceRequestFailure</key>
+ <map>
+ <key>Comment</key>
+ <string>Request wrong cof version to test the failure path for server appearance update requests.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugHideEmptySystemFolders</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 8d41edf6af..30e7f32ef7 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -3046,7 +3046,7 @@ public:
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
- dumpContents("appearance_request_ok", content);
+ dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_ok", content);
}
}
else
@@ -3055,29 +3055,13 @@ 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;
- }
-
- void debugCOF(const LLSD& content)
- {
- //S32 cof_version = content["cof_version"];
- //S32 cof_expected = content["expected"];
- //S32 cof_observed = content["observed"];
- }
-
// Error
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
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);
+ dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_error", content);
debugCOF(content);
}
@@ -3101,6 +3085,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;
+ }
+
+ void debugCOF(const LLSD& content)
+ {
+ //S32 cof_version = content["cof_version"];
+ //S32 cof_expected = content["expected"];
+ //S32 cof_observed = content["observed"];
+ }
+
+
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
};
@@ -3131,6 +3132,10 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond
LLSD body;
S32 cof_version = getCOFVersion();
body["cof_version"] = cof_version;
+ if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
+ {
+ body["cof_version"] = cof_version+1;
+ }
LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl;
//LLCurl::ResponderPtr responder_ptr;