summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-x[-rw-r--r--]indra/llcommon/llsdutil.cpp0
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llagent.cpp4
-rwxr-xr-xindra/newview/llappearancemgr.cpp40
-rwxr-xr-xindra/newview/llinventorymodel.cpp11
-rwxr-xr-x[-rw-r--r--]indra/newview/llstartup.cpp0
-rwxr-xr-xindra/newview/llviewerinventory.cpp19
-rwxr-xr-xindra/newview/llviewerinventory.h4
-rwxr-xr-xindra/newview/llvoavatar.cpp57
-rwxr-xr-xindra/newview/llvoavatar.h7
-rwxr-xr-xindra/newview/llvoavatarself.cpp2
11 files changed, 112 insertions, 43 deletions
diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp
index 803417d368..803417d368 100644..100755
--- a/indra/llcommon/llsdutil.cpp
+++ b/indra/llcommon/llsdutil.cpp
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/llagent.cpp b/indra/newview/llagent.cpp
index e15c1a5104..6c082a7e9c 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4292,10 +4292,6 @@ void LLAgent::requestLeaveGodMode()
sendReliableMessage();
}
-extern void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
-extern std::string get_sequential_numbered_file_name(const std::string& prefix,
- const std::string& suffix);
-
// For debugging, trace agent state at times appearance message are sent out.
void LLAgent::dumpSentAppearance(const std::string& dump_prefix)
{
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 23a908c0ff..30e7f32ef7 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()
{
@@ -1805,8 +1806,6 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
removeDuplicateItems(gest_items);
// Create links to new COF contents.
- LL_DEBUGS("Avatar") << self_av_string() << "creating LLCallAfterInventoryLinkMgr" << LL_ENDL;
-
LLInventoryModel::item_array_t all_items;
all_items += body_items;
all_items += wear_items;
@@ -3045,6 +3044,10 @@ public:
if (content["success"].asBoolean())
{
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
+ if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+ {
+ dumpContents(gAgentAvatarp->getFullname() + "_appearance_request_ok", content);
+ }
}
else
{
@@ -3055,8 +3058,13 @@ public:
// 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(gAgentAvatarp->getFullname() + "_appearance_request_error", content);
+ debugCOF(content);
+
+ }
onFailure(status);
}
@@ -3077,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;
};
@@ -3091,6 +3116,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 +3132,11 @@ 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;
+ 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;
if (!responder_ptr.get())
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index ac1f40b486..171a2cd043 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1922,7 +1922,18 @@ bool LLInventoryModel::loadSkeleton(
for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it)
{
LLViewerInventoryCategory *llvic = (*it);
+#if 1
llvic->setVersion(NO_VERSION);
+#else
+ if (llvic->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT && llvic->getVersion()==1)
+ {
+ llinfos << "preserving empty COF for first-time login" << llendl;
+ }
+ else
+ {
+ llvic->setVersion(NO_VERSION);
+ }
+#endif
addCategory(*it);
}
}
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 9d0df5e83e..9d0df5e83e 100644..100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index d6f0874a58..59efcfa7fa 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -592,7 +592,7 @@ void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCatego
{
copyCategory(other);
mOwnerID = other->mOwnerID;
- mVersion = other->mVersion;
+ setVersion(other->getVersion());
mDescendentCount = other->mDescendentCount;
mDescendentsRequested = other->mDescendentsRequested;
}
@@ -660,9 +660,19 @@ void LLViewerInventoryCategory::removeFromServer( void )
gAgent.sendReliableMessage();
}
+S32 LLViewerInventoryCategory::getVersion() const
+{
+ return mVersion;
+}
+
+void LLViewerInventoryCategory::setVersion(S32 version)
+{
+ mVersion = version;
+}
+
bool LLViewerInventoryCategory::fetch()
{
- if((VERSION_UNKNOWN == mVersion)
+ if((VERSION_UNKNOWN == getVersion())
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
LL_DEBUGS("InventoryFetch") << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
@@ -1127,6 +1137,11 @@ void link_inventory_item(
}
}
+#if 1 // debugging stuff
+ LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id);
+ lldebugs << "cat: " << cat << llendl;
+
+#endif
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LinkInventoryItem);
msg->nextBlock(_PREHASH_AgentData);
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 13e95c57cb..812b3b2739 100755
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -205,8 +205,8 @@ public:
// Version handling
enum { VERSION_UNKNOWN = -1, VERSION_INITIAL = 1 };
- S32 getVersion() const { return mVersion; }
- void setVersion(S32 version) { mVersion = version; }
+ S32 getVersion() const;
+ void setVersion(S32 version);
// Returns true if a fetch was issued.
bool fetch();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 266b9fecd5..afe8a037b7 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -190,11 +190,6 @@ enum ERenderName
RENDER_NAME_FADE
};
-
-// Utility func - FIXME move out of avatar.
-std::string get_sequential_numbered_file_name(const std::string& prefix,
- const std::string& suffix);
-
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@@ -215,6 +210,24 @@ struct LLTextureMaskData
**
**/
+struct LLAppearanceMessageContents
+{
+ LLAppearanceMessageContents():
+ mAppearanceVersion(-1),
+ mParamAppearanceVersion(-1),
+ mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ }
+ LLTEContents mTEContents;
+ S32 mAppearanceVersion;
+ S32 mParamAppearanceVersion;
+ S32 mCOFVersion;
+ // For future use:
+ //U32 appearance_flags = 0;
+ std::vector<F32> mParamWeights;
+ std::vector<LLVisualParam*> mParams;
+};
+
//-----------------------------------------------------------------------------
// class LLBodyNoiseMotion
//-----------------------------------------------------------------------------
@@ -6730,10 +6743,11 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
- const std::vector<F32>& params_for_dump,
- const LLTEContents& tec)
+ const LLAppearanceMessageContents& contents)
{
std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml");
+ const std::vector<F32>& params_for_dump = contents.mParamWeights;
+ const LLTEContents& tec = contents.mTEContents;
LLAPRFile outfile;
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
@@ -6748,7 +6762,12 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl;
}
+ apr_file_printf(file, "<header>\n");
+ apr_file_printf(file, "\t\t<cof_version %i />\n", contents.mCOFVersion);
+ apr_file_printf(file, "\t\t<appearance_version %i />\n", contents.mAppearanceVersion);
+ apr_file_printf(file, "</header>\n");
+ apr_file_printf(file, "\n<params>\n");
LLVisualParam* param = getFirstVisualParam();
for (S32 i = 0; i < params_for_dump.size(); i++)
{
@@ -6761,32 +6780,18 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
dump_visual_param(file, viewer_param, value);
param = getNextVisualParam();
}
+ apr_file_printf(file, "</params>\n");
+
+ apr_file_printf(file, "\n<textures>\n");
for (U32 i = 0; i < tec.face_count; i++)
{
std::string uuid_str;
((LLUUID*)tec.image_data)[i].toString(uuid_str);
apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", i, uuid_str.c_str());
}
+ apr_file_printf(file, "</textures>\n");
}
-struct LLAppearanceMessageContents
-{
- LLAppearanceMessageContents():
- mAppearanceVersion(-1),
- mParamAppearanceVersion(-1),
- mCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN)
- {
- }
- LLTEContents mTEContents;
- S32 mAppearanceVersion;
- S32 mParamAppearanceVersion;
- S32 mCOFVersion;
- // For future use:
- //U32 appearance_flags = 0;
- std::vector<F32> mParamWeights;
- std::vector<LLVisualParam*> mParams;
-};
-
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
{
parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, contents.mTEContents);
@@ -6925,7 +6930,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
parseAppearanceMessage(mesgsys, contents);
if (enable_verbose_dumps)
{
- dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents.mParamWeights, contents.mTEContents);
+ dumpAppearanceMsgParams(dump_prefix + "appearance_msg", contents);
}
S32 appearance_version;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index c989673cdf..5ebd8d0399 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -928,8 +928,7 @@ private:
public:
void dumpArchetypeXML(const std::string& prefix, bool group_by_wearables = false);
void dumpAppearanceMsgParams( const std::string& dump_prefix,
- const std::vector<F32>& paramsForDump,
- const LLTEContents& tec);
+ const LLAppearanceMessageContents& contents);
static void dumpBakedStatus();
const std::string getBakedStatusForPrintout() const;
void dumpAvatarTEs(const std::string& context) const;
@@ -980,5 +979,9 @@ protected: // Shared with LLVOAvatarSelf
extern const F32 SELF_ADDITIONAL_PRI;
extern const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL;
+std::string get_sequential_numbered_file_name(const std::string& prefix,
+ const std::string& suffix);
+void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
+
#endif // LL_VOAVATAR_H
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 0e8e48099e..c069488a37 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -3049,8 +3049,6 @@ void LLVOAvatarSelf::dumpScratchTextureByteCount()
llinfos << "Scratch Texture GL: " << (sScratchTexBytes/1024) << "KB" << llendl;
}
-void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
-
void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
{
apr_file_t* file = outfile.getFileHandle();