diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-02-28 15:58:56 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-02-28 15:58:56 -0500 |
commit | ecb3d1d64d035f22c6d85864131cae6a1108fc68 (patch) | |
tree | 902057dba6c9f1f223a18f5fb6c0cece4fc5099d /indra | |
parent | 22f05155990176ece57390e69de71deae9f34ed4 (diff) |
SH-3932 FIX - added LLSD blob for viewer-side cof contents, optionally included with request appearance update
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 25 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.h | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 48a2ab0eb2..6c3858b947 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3165,6 +3165,27 @@ public: LLPointer<LLHTTPRetryPolicy> mRetryPolicy; }; +LLSD LLAppearanceMgr::dumpCOF() const +{ + LLSD result = LLSD::emptyArray(); + + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + gInventory.collectDescendents(getCOF(),cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); + for (S32 i=0; i<item_array.count(); i++) + { + const LLViewerInventoryItem* inv_item = item_array.get(i).get(); + LLSD item; + item["item_id"] = inv_item->getUUID(); + item["linked_item_id"] = inv_item->getLinkedUUID(); + item["name"] = inv_item->getName(); + item["description"] = inv_item->getActualDescription(); + item["type"] = inv_item->getActualType(); + result.append(item); + } + return result; +} + void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr responder_ptr) { if (gAgentAvatarp->isEditingAppearance()) @@ -3196,6 +3217,10 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond { body["cof_version"] = cof_version+999; } + if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) + { + body["debug_cof"] = dumpCOF(); + } LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl; //LLCurl::ResponderPtr responder_ptr; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index b35504eb1f..84e08db4c8 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -94,6 +94,9 @@ public: const LLUUID getCOF() const; S32 getCOFVersion() const; + // Debugging - get truncated LLSD summary of COF contents. + LLSD dumpCOF() const; + // COF version of last viewer-initiated appearance update request. S32 mLastUpdateRequestCOFVersion; S32 getLastUpdateRequestCOFVersion() const; |