From f93604c399c889e06980554e1cb59a833e7f847d Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Thu, 15 Nov 2012 15:20:05 -0500 Subject: WIP Working on adding http request to increment the COF version when a change is made to an item in an agent's current outfit folder. SH-3339 --- indra/cmake/Variables.cmake | 1 + indra/newview/llpaneleditwearable.cpp | 42 +++++++++++++++++++++++++++++++++++ indra/newview/llpaneleditwearable.h | 12 ++++++---- indra/newview/llviewerregion.cpp | 1 + 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 895b3003db..4cd878a2e3 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -97,6 +97,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) + set(FIND_LIBRARY_USE_LIB64_PATHS OFF) else (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) endif (WORD_SIZE EQUAL 32) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 7832156a0e..9862c98cc8 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1028,6 +1028,46 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } +//static +void LLPanelEditWearable::incrementCofVersion() +{ + // Create a response handler + LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLMaturityPreferencesResponder(this)); + + // Look up the capability to POST to. + std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); + + // If we don't have a region, report it as an error + if (getRegion() == NULL) + { + responderPtr->error(0U, "region is not defined"); + } + else + { + // Find the capability to send maturity preference + std::string url = getRegion()->getCapability("UpdateAgentInformation"); + + // If the capability is not defined, report it as an error + if (url.empty()) + { + responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region"); + } + else + { + // Set new access preference + LLSD access_prefs = LLSD::emptyMap(); + access_prefs["max"] = LLViewerRegion::accessToShortString(pPreferredMaturity); + + LLSD body = LLSD::emptyMap(); + body["access_prefs"] = access_prefs; + llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) + << "' via capability to: " << url << llendl; + LLSD headers; + LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); + } + } +} + void LLPanelEditWearable::saveChanges(bool force_save_as) { if (!mWearablePtr || !isDirty()) @@ -1050,6 +1090,8 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) { gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); } + + LLPanelEditWearable::incrementCofVersion(); } void LLPanelEditWearable::revertChanges() diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 309d512e23..619486bb5b 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -31,6 +31,8 @@ #include "llscrollingpanellist.h" #include "llmodaldialog.h" #include "llavatarappearancedefines.h" +#include "llagent.h" +#include "llviewerregion.h" #include "llwearabletype.h" class LLAccordionCtrl; @@ -94,7 +96,7 @@ private: void toggleTypeSpecificControls(LLWearableType::EType type); void updateTypeSpecificControls(LLWearableType::EType type); - //alpha mask checkboxes + // alpha mask checkboxes void configureAlphaCheckbox(LLAvatarAppearanceDefines::ETextureIndex te, const std::string& name); void onInvisibilityCommit(LLCheckBoxCtrl* checkbox_ctrl, LLAvatarAppearanceDefines::ETextureIndex te); void updateAlphaCheckboxes(); @@ -104,7 +106,7 @@ private: // callback for HeightUnits parameter. bool changeHeightUnits(const LLSD& new_value); - // updates current metric and replacemet metric label text + // updates current metric and replacement metric label text void updateMetricLayout(BOOL new_value); // updates avatar height label @@ -114,6 +116,8 @@ private: void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel); + static void incrementCofVersion(); + // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLViewerWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; @@ -128,7 +132,7 @@ private: LLTextBox *mTxtAvatarHeight; - // localized and parametrized strings that used to build avatar_height_label + // localized and parameterized strings that used to build avatar_height_label std::string mMeters; std::string mFeet; std::string mHeigth; @@ -151,7 +155,7 @@ private: LLPanel *mPanelEyes; LLPanel *mPanelHair; - //clothes + // clothes LLPanel *mPanelShirt; LLPanel *mPanelPants; LLPanel *mPanelShoes; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 0855bc9243..94533d97df 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1541,6 +1541,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("FetchLibDescendents2"); capabilityNames.append("FetchInventory2"); capabilityNames.append("FetchInventoryDescendents2"); + capabilityNames.append("IncrementCOFVersion"); } capabilityNames.append("GetDisplayNames"); -- cgit v1.2.3 From ee810bf2abe230769bd5ee81dc76e54d5fcda34c Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Fri, 16 Nov 2012 17:07:45 -0500 Subject: WIP First buildable code after adding support for SH-3339. --- indra/cmake/Variables.cmake | 24 ++------- indra/newview/llpaneleditwearable.cpp | 96 ++++++++++++++++++++++++----------- indra/newview/llpaneleditwearable.h | 3 +- 3 files changed, 71 insertions(+), 52 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 54c77da64e..4cd878a2e3 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -70,6 +70,10 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) + if (INSTALL_PROPRIETARY) + set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") + endif (INSTALL_PROPRIETARY) + # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) @@ -94,36 +98,18 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) - set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) else (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) - set(FIND_LIBRARY_USE_LIB64_PATHS ON) endif (WORD_SIZE EQUAL 32) - execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH - RESULT_VARIABLE DPKG_RESULT - OUTPUT_VARIABLE DPKG_ARCH - OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") if (DPKG_RESULT EQUAL 0) set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) - set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) endif (DPKG_RESULT EQUAL 0) - include(ConfigurePkgConfig) - set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) - - if (INSTALL_PROPRIETARY) - # Only turn on headless if we can find osmesa libraries. - include(FindPkgConfig) - pkg_check_modules(OSMESA osmesa) - if (OSMESA_FOUND) - set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") - endif (OSMESA_FOUND) - endif (INSTALL_PROPRIETARY) - endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 9862c98cc8..997edbab07 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -26,6 +26,8 @@ #include "llviewerprecompiledheaders.h" +#include + #include "llpaneleditwearable.h" #include "llpanel.h" #include "llviewerwearable.h" @@ -47,6 +49,7 @@ #include "llscrollingpanelparam.h" #include "llradiogroup.h" #include "llnotificationsutil.h" +#include "llhttpclient.h" #include "llcolorswatch.h" #include "lltexturectrl.h" @@ -1028,44 +1031,75 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } +class LLIncrementCofVersionResponder : public LLHTTPClient::Responder +{ +public: + LLIncrementCofVersionResponder(S32 retries); + virtual ~LLIncrementCofVersionResponder(); + + virtual void result(const LLSD &pContent); + virtual void error(U32 pStatus, const std::string& pReason); + +protected: + +private: + LLAgent *mAgent; + S32 mRetries; +}; + +LLIncrementCofVersionResponder::LLIncrementCofVersionResponder(S32 retries) + : LLHTTPClient::Responder(), + mRetries(retries) +{ +} + +LLIncrementCofVersionResponder::~LLIncrementCofVersionResponder() +{ +} + +void LLIncrementCofVersionResponder::result(const LLSD &pContent) +{ + lldebugs << "Successfully incremented agent's COF." << llendl; + +} + +void LLIncrementCofVersionResponder::error(U32 pStatus, const std::string& pReason) +{ + llwarns << "While attempting to increment the agent's cof we got an error because '" + << pReason << "' [status:" << pStatus << "]" << llendl; + LLPanelEditWearable::incrementCofVersion(mRetries++); +} + //static -void LLPanelEditWearable::incrementCofVersion() +void LLPanelEditWearable::incrementCofVersion(S32 retries) { - // Create a response handler - LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLMaturityPreferencesResponder(this)); + // Create a response handler + LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLIncrementCofVersionResponder(retries)); - // Look up the capability to POST to. - std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); + // If we don't have a region, report it as an error + if (gAgent.getRegion() == NULL) + { + responderPtr->error(0U, "region is not defined"); + } + else + { + // Find the capability to send maturity preference + std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); - // If we don't have a region, report it as an error - if (getRegion() == NULL) + // If the capability is not defined, report it as an error + if (url.empty()) { - responderPtr->error(0U, "region is not defined"); + responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region"); } else { - // Find the capability to send maturity preference - std::string url = getRegion()->getCapability("UpdateAgentInformation"); - - // If the capability is not defined, report it as an error - if (url.empty()) - { - responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region"); - } - else - { - // Set new access preference - LLSD access_prefs = LLSD::emptyMap(); - access_prefs["max"] = LLViewerRegion::accessToShortString(pPreferredMaturity); - - LLSD body = LLSD::emptyMap(); - body["access_prefs"] = access_prefs; - llinfos << "Sending viewer preferred maturity to '" << LLViewerRegion::accessToString(pPreferredMaturity) - << "' via capability to: " << url << llendl; - LLSD headers; - LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); - } - } + llinfos << "Requesting cof_version be incremented via capability to: " + << url << llendl; + LLSD headers; + LLSD body = LLSD::emptyMap(); + LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); + } + } } void LLPanelEditWearable::saveChanges(bool force_save_as) @@ -1091,7 +1125,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); } - LLPanelEditWearable::incrementCofVersion(); + LLPanelEditWearable::incrementCofVersion(0); } void LLPanelEditWearable::revertChanges() diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 619486bb5b..9c9eac791e 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -78,6 +78,7 @@ public: virtual void setVisible(BOOL visible); + static void incrementCofVersion(S32 retries); private: typedef std::map value_map_t; @@ -116,8 +117,6 @@ private: void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel); - static void incrementCofVersion(); - // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLViewerWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; -- cgit v1.2.3 From 2aa56069f458441daa74a86a8805763482f02fd6 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Mon, 19 Nov 2012 14:26:59 -0500 Subject: WIP SH-3339 Only try to increment the cof version if in a server bake region. --- indra/newview/llpaneleditwearable.cpp | 11 ++++++++++- indra/newview/llpaneleditwearable.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 997edbab07..ad55936cab 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1070,6 +1070,12 @@ void LLIncrementCofVersionResponder::error(U32 pStatus, const std::string& pReas LLPanelEditWearable::incrementCofVersion(mRetries++); } +//static +void LLPanelEditWearable::incrementCofVersion() +{ + incrementCofVersion(0); +} + //static void LLPanelEditWearable::incrementCofVersion(S32 retries) { @@ -1125,7 +1131,10 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); } - LLPanelEditWearable::incrementCofVersion(0); + if (gAgentAvatarp->isUsingServerBakes()) + { + LLPanelEditWearable::incrementCofVersion(0); + } } void LLPanelEditWearable::revertChanges() diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 9c9eac791e..67217f8751 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -78,6 +78,7 @@ public: virtual void setVisible(BOOL visible); + static void incrementCofVersion(); static void incrementCofVersion(S32 retries); private: -- cgit v1.2.3 From 81219ad03b59a5fcd80ee450b7606c6bb64f4c7d Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Mon, 19 Nov 2012 16:30:14 -0500 Subject: Moved implementation of incrementCofVersion to llappearancemgr.cpp. Changed retry logic to use the more robust mRetryPolicy instead of my own previous implementation. --- indra/newview/llappearancemgr.cpp | 75 +++++++++++++++++++++++++++++++++ indra/newview/llappearancemgr.h | 2 + indra/newview/llpaneleditwearable.cpp | 79 +---------------------------------- indra/newview/llpaneleditwearable.h | 3 -- 4 files changed, 78 insertions(+), 81 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 4e103bb75e..e3ac052961 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2776,6 +2776,81 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond mLastUpdateRequestCOFVersion = cof_version; } +class LLIncrementCofVersionResponder : public LLHTTPClient::Responder +{ +public: + LLIncrementCofVersionResponder() : LLHTTPClient::Responder() + { + mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5); + } + + virtual ~LLIncrementCofVersionResponder() + { + } + + virtual void result(const LLSD &pContent) + { + llinfos << "Successfully incremented agent's COF." << llendl; + S32 new_version = pContent["category"]["version"].asInteger(); + + LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance(); + + // cof_version should have increased + llassert(new_version > app_mgr->mLastUpdateRequestCOFVersion); + + app_mgr->mLastUpdateRequestCOFVersion = new_version; + } + virtual void error(U32 pStatus, const std::string& pReason) + { + llwarns << "While attempting to increment the agent's cof we got an error because '" + << pReason << "' [status:" << pStatus << "]" << llendl; + F32 seconds_to_wait; + if (mRetryPolicy->shouldRetry(pStatus,seconds_to_wait)) + { + llinfos << "retrying" << llendl; + doAfterInterval(boost::bind(&LLAppearanceMgr::incrementCofVersion, + LLAppearanceMgr::getInstance(), + LLHTTPClient::ResponderPtr(this)), + seconds_to_wait); + } + else + { + llwarns << "giving up after too many retries" << llendl; + } + } + + LLPointer mRetryPolicy; +}; + +void LLAppearanceMgr::incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr) +{ + // If we don't have a region, report it as an error + if (gAgent.getRegion() == NULL) + { + llwarns << "Region not set, cannot request cof_version increment" << llendl; + return; + } + + std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); + if (url.empty()) + { + llwarns << "No cap for IncrementCofVersion." << llendl; + return; + } + + llinfos << "Requesting cof_version be incremented via capability to: " + << url << llendl; + LLSD headers; + LLSD body = LLSD::emptyMap(); + + if (!responder_ptr.get()) + { + responder_ptr = LLHTTPClient::ResponderPtr(new LLIncrementCofVersionResponder()); + } + + LLHTTPClient::get(url, body, responder_ptr, headers, 30.0f); +} + class LLShowCreatedOutfit: public LLInventoryCallback { public: diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 01ed66711c..525402c215 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -189,6 +189,8 @@ public: void requestServerAppearanceUpdate(LLCurl::ResponderPtr responder_ptr = NULL); + void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index ad55936cab..2bc952dcae 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1031,83 +1031,6 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } -class LLIncrementCofVersionResponder : public LLHTTPClient::Responder -{ -public: - LLIncrementCofVersionResponder(S32 retries); - virtual ~LLIncrementCofVersionResponder(); - - virtual void result(const LLSD &pContent); - virtual void error(U32 pStatus, const std::string& pReason); - -protected: - -private: - LLAgent *mAgent; - S32 mRetries; -}; - -LLIncrementCofVersionResponder::LLIncrementCofVersionResponder(S32 retries) - : LLHTTPClient::Responder(), - mRetries(retries) -{ -} - -LLIncrementCofVersionResponder::~LLIncrementCofVersionResponder() -{ -} - -void LLIncrementCofVersionResponder::result(const LLSD &pContent) -{ - lldebugs << "Successfully incremented agent's COF." << llendl; - -} - -void LLIncrementCofVersionResponder::error(U32 pStatus, const std::string& pReason) -{ - llwarns << "While attempting to increment the agent's cof we got an error because '" - << pReason << "' [status:" << pStatus << "]" << llendl; - LLPanelEditWearable::incrementCofVersion(mRetries++); -} - -//static -void LLPanelEditWearable::incrementCofVersion() -{ - incrementCofVersion(0); -} - -//static -void LLPanelEditWearable::incrementCofVersion(S32 retries) -{ - // Create a response handler - LLHTTPClient::ResponderPtr responderPtr = LLHTTPClient::ResponderPtr(new LLIncrementCofVersionResponder(retries)); - - // If we don't have a region, report it as an error - if (gAgent.getRegion() == NULL) - { - responderPtr->error(0U, "region is not defined"); - } - else - { - // Find the capability to send maturity preference - std::string url = gAgent.getRegion()->getCapability("IncrementCofVersion"); - - // If the capability is not defined, report it as an error - if (url.empty()) - { - responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region"); - } - else - { - llinfos << "Requesting cof_version be incremented via capability to: " - << url << llendl; - LLSD headers; - LLSD body = LLSD::emptyMap(); - LLHTTPClient::post(url, body, responderPtr, headers, 30.0f); - } - } -} - void LLPanelEditWearable::saveChanges(bool force_save_as) { if (!mWearablePtr || !isDirty()) @@ -1133,7 +1056,7 @@ void LLPanelEditWearable::saveChanges(bool force_save_as) if (gAgentAvatarp->isUsingServerBakes()) { - LLPanelEditWearable::incrementCofVersion(0); + LLAppearanceMgr::getInstance()->incrementCofVersion(); } } diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 67217f8751..cd29a5d764 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -78,9 +78,6 @@ public: virtual void setVisible(BOOL visible); - static void incrementCofVersion(); - static void incrementCofVersion(S32 retries); - private: typedef std::map value_map_t; -- cgit v1.2.3 From ed2ec5e24425466c09c9d7b5b1408f0d6aaf5bd8 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Mon, 19 Nov 2012 16:49:00 -0500 Subject: Restored part of indra/cmake/Variables.cmake that somehow got removed. --- indra/cmake/Variables.cmake | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 4cd878a2e3..54c77da64e 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -70,10 +70,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) - if (INSTALL_PROPRIETARY) - set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") - endif (INSTALL_PROPRIETARY) - # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) @@ -98,18 +94,36 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) else (WORD_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) + set(FIND_LIBRARY_USE_LIB64_PATHS ON) endif (WORD_SIZE EQUAL 32) - execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH + RESULT_VARIABLE DPKG_RESULT + OUTPUT_VARIABLE DPKG_ARCH + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") if (DPKG_RESULT EQUAL 0) set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) endif (DPKG_RESULT EQUAL 0) + include(ConfigurePkgConfig) + set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) + + if (INSTALL_PROPRIETARY) + # Only turn on headless if we can find osmesa libraries. + include(FindPkgConfig) + pkg_check_modules(OSMESA osmesa) + if (OSMESA_FOUND) + set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") + endif (OSMESA_FOUND) + endif (INSTALL_PROPRIETARY) + endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -- cgit v1.2.3 From 632addf63dd6db5cffc18fd351b1899b30fc9062 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Mon, 19 Nov 2012 16:56:03 -0500 Subject: Removed a few unnecessary include lines. --- indra/newview/llpaneleditwearable.cpp | 3 --- indra/newview/llpaneleditwearable.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 2bc952dcae..3e7db06bdf 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -26,8 +26,6 @@ #include "llviewerprecompiledheaders.h" -#include - #include "llpaneleditwearable.h" #include "llpanel.h" #include "llviewerwearable.h" @@ -49,7 +47,6 @@ #include "llscrollingpanelparam.h" #include "llradiogroup.h" #include "llnotificationsutil.h" -#include "llhttpclient.h" #include "llcolorswatch.h" #include "lltexturectrl.h" diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index cd29a5d764..50d5328a83 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -31,8 +31,6 @@ #include "llscrollingpanellist.h" #include "llmodaldialog.h" #include "llavatarappearancedefines.h" -#include "llagent.h" -#include "llviewerregion.h" #include "llwearabletype.h" class LLAccordionCtrl; -- cgit v1.2.3 From 3565f6f36db90e1a9a5918d8087f9dc0ab61eb69 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Thu, 13 Dec 2012 18:07:50 -0500 Subject: WIP SH-3339. Commit to merge from trunk to get build fixes, etc. --- indra/newview/llappearancemgr.h | 3 ++ indra/newview/llpaneleditwearable.cpp | 54 +++++++++++++++++++++-------------- indra/newview/llpaneleditwearable.h | 3 ++ 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 525402c215..7c94542e20 100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -191,6 +191,9 @@ public: void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL); + // *HACK Remove this after server side texture baking is deployed on all sims. + void incrementCofVersionLegacy(); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 3e7db06bdf..650e1809cf 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -1028,33 +1028,43 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type) } } +void LLPanelEditWearable::incrementCofVersionLegacy() +{ + +} + void LLPanelEditWearable::saveChanges(bool force_save_as) { - if (!mWearablePtr || !isDirty()) - { - // do nothing if no unsaved changes - return; - } + if (!mWearablePtr || !isDirty()) + { + // do nothing if no unsaved changes + return; + } - U32 index = gAgentWearables.getWearableIndex(mWearablePtr); + U32 index = gAgentWearables.getWearableIndex(mWearablePtr); - std::string new_name = mNameEditor->getText(); - if (force_save_as) - { - // the name of the wearable has changed, re-save wearable with new name - LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID()); - gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, FALSE); - mNameEditor->setText(mWearableItem->getName()); - } - else - { - gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); - } + std::string new_name = mNameEditor->getText(); + if (force_save_as) + { + // the name of the wearable has changed, re-save wearable with new name + LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID()); + gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, FALSE); + mNameEditor->setText(mWearableItem->getName()); + } + else + { + gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name); + } - if (gAgentAvatarp->isUsingServerBakes()) - { - LLAppearanceMgr::getInstance()->incrementCofVersion(); - } + if (getRegion() && getRegion()->getCentralBakeVersion() > 0) + { + LLAppearanceMgr::getInstance()->incrementCofVersion(); + } + else + { + // *HACK This should be removed when all regions support the IncrementCOFVersion capability. + incrementCofVersionLegacy(); + } } void LLPanelEditWearable::revertChanges() diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 50d5328a83..c5b44ecc9d 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -113,6 +113,9 @@ private: void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel); + // *HACK Remove this when serverside texture baking is available on all regions. + void incrementCofVersionLegacy(); + // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLViewerWearable *mWearablePtr; LLViewerInventoryItem* mWearableItem; -- cgit v1.2.3 From f34ef33e5ceb7f94ee8ca8586880d7be0e5ced82 Mon Sep 17 00:00:00 2001 From: Logan Dethrow Date: Tue, 15 Jan 2013 17:43:16 -0500 Subject: Fixed spelling error. --- indra/newview/llviewerinventory.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 13e95c57cb..83f0486f01 100755 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -211,7 +211,7 @@ public: // Returns true if a fetch was issued. bool fetch(); - // used to help make cacheing more robust - for example, if + // used to help make caching more robust - for example, if // someone is getting 4 packets but logs out after 3. the viewer // may never know the cache is wrong. enum { DESCENDENT_COUNT_UNKNOWN = -1 }; @@ -219,7 +219,7 @@ public: void setDescendentCount(S32 descendents) { mDescendentCount = descendents; } // file handling on the viewer. These are not meant for anything - // other than cacheing. + // other than caching. bool exportFileLocal(LLFILE* fp) const; bool importFileLocal(LLFILE* fp); void determineFolderType(); -- cgit v1.2.3 From 756ab4cad5908f30c29a9e86f6905745dbec616c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Feb 2013 16:50:11 -0800 Subject: SH-3864 FIX Closing the Inventory window exits outfit editing. cleaned up logic when closing floatersidepanels --- indra/newview/llfloatersidepanelcontainer.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/indra/newview/llfloatersidepanelcontainer.cpp b/indra/newview/llfloatersidepanelcontainer.cpp index 02150819a0..ce5ea66471 100755 --- a/indra/newview/llfloatersidepanelcontainer.cpp +++ b/indra/newview/llfloatersidepanelcontainer.cpp @@ -59,30 +59,22 @@ void LLFloaterSidePanelContainer::onOpen(const LLSD& key) void LLFloaterSidePanelContainer::onClickCloseBtn() { - llinfos << "close clicked" << llendl; - LLPanelOutfitEdit* panel_outfit_edit = dynamic_cast(LLFloaterSidePanelContainer::getPanel("appearance", "panel_outfit_edit")); - if (panel_outfit_edit && panel_outfit_edit->getVisible()) + if (panel_outfit_edit) { LLFloater *parent = gFloaterView->getParentFloater(panel_outfit_edit); - if (parent == this) + if (parent == this ) { - LLSidepanelAppearance* panel_appearance = - dynamic_cast(getPanel("appearance")); - panel_appearance->showOutfitsInventoryPanel(); + LLSidepanelAppearance* panel_appearance = dynamic_cast(getPanel("appearance")); + if ( panel_appearance ) + { + panel_appearance->getWearable()->onClose(); + panel_appearance->showOutfitsInventoryPanel(); + } } } - if ( panel_outfit_edit ) - { - LLSidepanelAppearance* panel_appearance = dynamic_cast(getPanel("appearance")); - if ( panel_appearance ) - { - panel_appearance->getWearable()->onClose(); - panel_appearance->showOutfitsInventoryPanel(); - } - } LLFloater::onClickCloseBtn(); } -- cgit v1.2.3 From b16dcda6a387774a446c04f63e1a55bd35ec7afe Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 25 Feb 2013 19:12:36 -0500 Subject: SH-3860 WIP, SH-3899 WIP - make folder version management more debuggable, log appearance request results --- indra/llcommon/llsdutil.cpp | 0 indra/newview/llagent.cpp | 4 ---- indra/newview/llappearancemgr.cpp | 24 +++++++++++++++++++++--- indra/newview/llinventorymodel.cpp | 11 +++++++++++ indra/newview/llstartup.cpp | 0 indra/newview/llviewerinventory.cpp | 19 +++++++++++++++++-- indra/newview/llviewerinventory.h | 4 ++-- indra/newview/llvoavatar.cpp | 5 ----- indra/newview/llvoavatar.h | 4 ++++ indra/newview/llvoavatarself.cpp | 2 -- 10 files changed, 55 insertions(+), 18 deletions(-) mode change 100644 => 100755 indra/llcommon/llsdutil.cpp mode change 100644 => 100755 indra/newview/llstartup.cpp diff --git a/indra/llcommon/llsdutil.cpp b/indra/llcommon/llsdutil.cpp old mode 100644 new mode 100755 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 10523ca998..d0f28b8c10 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() { @@ -3049,6 +3050,10 @@ public: if (content["success"].asBoolean()) { LL_DEBUGS("Avatar") << "OK" << LL_ENDL; + if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) + { + dumpContents("appearance_request_ok", content); + } } else { @@ -3056,11 +3061,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(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); } @@ -3095,6 +3112,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) { @@ -3110,7 +3128,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()) 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 old mode 100644 new mode 100755 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..04458da529 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 //----------------------------------------------------------------------------- diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index c989673cdf..3382a1ef17 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -980,5 +980,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(); -- cgit v1.2.3 From d679ad47d524f73bdde0204b91607f9221dc41ab Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 26 Feb 2013 07:45:50 -0500 Subject: cleaned up old message --- indra/newview/llappearancemgr.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 131bef6958..bd4e8ddf72 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1806,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; -- cgit v1.2.3 From 26ac1097729ce801e61523e3e42d7a868ddcde13 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 26 Feb 2013 22:00:50 -0500 Subject: SH-3899 WIP - more logging of appearance message info --- indra/newview/llappearancemgr.cpp | 9 +++++++ indra/newview/llvoavatar.cpp | 52 +++++++++++++++++++++++---------------- indra/newview/llvoavatar.h | 3 +-- 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index bd4e8ddf72..8d41edf6af 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3063,6 +3063,13 @@ public: ofs << LLSDOStreamer(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) @@ -3071,6 +3078,8 @@ public: if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage")) { dumpContents("appearance_request_error", content); + debugCOF(content); + } onFailure(status); } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 04458da529..afe8a037b7 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -210,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 mParamWeights; + std::vector mParams; +}; + //----------------------------------------------------------------------------- // class LLBodyNoiseMotion //----------------------------------------------------------------------------- @@ -6725,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& params_for_dump, - const LLTEContents& tec) + const LLAppearanceMessageContents& contents) { std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml"); + const std::vector& params_for_dump = contents.mParamWeights; + const LLTEContents& tec = contents.mTEContents; LLAPRFile outfile; std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); @@ -6743,7 +6762,12 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl; } + apr_file_printf(file, "
\n"); + apr_file_printf(file, "\t\t\n", contents.mCOFVersion); + apr_file_printf(file, "\t\t\n", contents.mAppearanceVersion); + apr_file_printf(file, "
\n"); + apr_file_printf(file, "\n\n"); LLVisualParam* param = getFirstVisualParam(); for (S32 i = 0; i < params_for_dump.size(); i++) { @@ -6756,32 +6780,18 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix, dump_visual_param(file, viewer_param, value); param = getNextVisualParam(); } + apr_file_printf(file, "\n"); + + apr_file_printf(file, "\n\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\n", i, uuid_str.c_str()); } + apr_file_printf(file, "\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 mParamWeights; - std::vector mParams; -}; - void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents) { parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, contents.mTEContents); @@ -6920,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 3382a1ef17..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& paramsForDump, - const LLTEContents& tec); + const LLAppearanceMessageContents& contents); static void dumpBakedStatus(); const std::string getBakedStatusForPrintout() const; void dumpAvatarTEs(const std::string& context) const; -- cgit v1.2.3 From d9d5c7e0ccec47d57743304c800c5137dd50aa22 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 11:38:12 -0500 Subject: SH-3899 WIP - more verbose logging of appearance request status, debug option to force failures for testing --- indra/newview/app_settings/settings.xml | 11 +++++++++ indra/newview/llappearancemgr.cpp | 41 ++++++++++++++++++--------------- 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 @@ Value 1 + DebugForceAppearanceRequestFailure + + Comment + Request wrong cof version to test the failure path for server appearance update requests. + Persist + 1 + Type + Boolean + Value + 0 + DebugHideEmptySystemFolders Comment 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(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(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 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; -- cgit v1.2.3 From 72412e1b42325c35c02aef43a87b8907ca591d1f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 11:55:08 -0500 Subject: Fix for mac build failure --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 30e7f32ef7..a87be17505 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3089,7 +3089,7 @@ public: { std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); - std::ofstream ofs(fullpath); + std::ofstream ofs(fullpath, std::ios_base::out); ofs << LLSDOStreamer(content, LLSDFormatter::OPTIONS_PRETTY); LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; } -- cgit v1.2.3 From df3f6f6cacd3803748af569ad76ae1131ad1b1b9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 11:59:44 -0500 Subject: Fix for mac build failure this time for sure --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a87be17505..2e71f15a78 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3089,7 +3089,7 @@ public: { std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); - std::ofstream ofs(fullpath, std::ios_base::out); + std::ofstream ofs(fullpath.c_str(), std::ios_base::out); ofs << LLSDOStreamer(content, LLSDFormatter::OPTIONS_PRETTY); LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; } -- cgit v1.2.3 From 41d3b428e1cfbaf8e21a335e1a9ee9a12ad46c33 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 15:17:31 -0500 Subject: Increase number of retries for requestServerAppearanceUpdate() --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a87be17505..adfdb7d93d 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3030,7 +3030,7 @@ class RequestAgentUpdateAppearanceResponder: public LLHTTPClient::Responder public: RequestAgentUpdateAppearanceResponder() { - mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 16.0, 2.0, 5); + mRetryPolicy = new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10); } virtual ~RequestAgentUpdateAppearanceResponder() -- cgit v1.2.3 From 2b6d7e50053a7efd2a20032c801d4b7db3b49dc1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 27 Feb 2013 17:58:43 -0500 Subject: SH-3860 WIP - fixes for initial COF loading and config --- indra/newview/llappearancemgr.cpp | 2 +- indra/newview/llinventorymodel.cpp | 4 ++-- indra/newview/llstartup.cpp | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index adfdb7d93d..0177f6d83c 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1819,7 +1819,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) // Add link to outfit if category is an outfit. if (!append) { - createBaseOutfitLink(category, NULL); + createBaseOutfitLink(category, link_waiter); } // Remove current COF contents. Have to do this after creating diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 171a2cd043..f0bfc68866 100755 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -1922,9 +1922,9 @@ bool LLInventoryModel::loadSkeleton( for(cat_set_t::iterator it = temp_cats.begin(); it != temp_cats.end(); ++it) { LLViewerInventoryCategory *llvic = (*it); -#if 1 +#if 0 llvic->setVersion(NO_VERSION); -#else +#else // SH-3860 WIP if (llvic->getPreferredType()==LLFolderType::FT_CURRENT_OUTFIT && llvic->getVersion()==1) { llinfos << "preserving empty COF for first-time login" << llendl; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 9d0df5e83e..717f578ddb 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2572,12 +2572,21 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, } else { + // FIXME SH-3860 - this creates a race condition, where COF + // changes (base outfit link added) after appearance update + // request has been submitted. sWearablesLoadedCon = gAgentWearables.addLoadedCallback(LLStartUp::saveInitialOutfit); bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); +#if 0 // SH-3860 WIP + // Need to fetch cof contents before we can wear. + callAfterCategoryFetch(LLAppearanceMgr::instance().getCOF(), + boost::bind(&LLAppearanceMgr::wearInventoryCategory, LLAppearanceMgr::getInstance(), cat, do_copy, do_append)); +#else LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append); +#endif lldebugs << "initial outfit category id: " << cat_id << llendl; } -- cgit v1.2.3 From 03b51b779fd545e63b6f2fa2ef5ba28f21f1ae62 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Feb 2013 10:56:12 -0500 Subject: SH-3895. Added code to recognize if the second incoming regions seed caps differ in size from the initial region caps. Also avoid starting a inventory fetch responder if the requisite cap is missing" --- indra/newview/llinventorymodelbackgroundfetch.cpp | 28 ++++----- indra/newview/llviewerregion.cpp | 70 +++++++++++++++++++++-- indra/newview/llviewerregion.h | 5 +- 3 files changed, 84 insertions(+), 19 deletions(-) diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp index eb92902de9..024d34519f 100644 --- a/indra/newview/llinventorymodelbackgroundfetch.cpp +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -564,7 +564,6 @@ BOOL LLInventoryModelFetchDescendentsResponder::getIsRecursive(const LLUUID& cat { return (std::find(mRecursiveCatUUIDs.begin(),mRecursiveCatUUIDs.end(), cat_id) != mRecursiveCatUUIDs.end()); } - // Bundle up a bunch of requests to send all at once. // static void LLInventoryModelBackgroundFetch::bulkFetch() @@ -687,20 +686,23 @@ void LLInventoryModelBackgroundFetch::bulkFetch() { if (folder_count) { - std::string url = region->getCapability("FetchInventoryDescendents2"); - mFetchCount++; - if (folder_request_body["folders"].size()) - { - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats); - LLHTTPClient::post(url, folder_request_body, fetcher, 300.0); - } - if (folder_request_body_lib["folders"].size()) + std::string url = region->getCapability("FetchInventoryDescendents2"); + if ( !url.empty() ) { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); + mFetchCount++; + if (folder_request_body["folders"].size()) + { + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body, recursive_cats); + LLHTTPClient::post(url, folder_request_body, fetcher, 300.0); + } + if (folder_request_body_lib["folders"].size()) + { + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents2"); - LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats); - LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0); - } + LLInventoryModelFetchDescendentsResponder *fetcher = new LLInventoryModelFetchDescendentsResponder(folder_request_body_lib, recursive_cats); + LLHTTPClient::post(url_lib, folder_request_body_lib, fetcher, 300.0); + } + } } if (item_count) { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index d60ec04578..db5bba89e2 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -142,7 +142,8 @@ public: LLUUID mCacheID; CapabilityMap mCapabilities; - + CapabilityMap mSecondCapabilitiesTracker; + LLEventPoll* mEventPoll; S32 mSeedCapMaxAttempts; @@ -219,7 +220,7 @@ public: } } - void result(const LLSD& content) + void result(const LLSD& content) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); if(!regionp) //region was removed @@ -237,6 +238,7 @@ public: for(iter = content.beginMap(); iter != content.endMap(); ++iter) { regionp->setCapability(iter->first, iter->second); + LL_DEBUGS2("AppInit", "Capabilities") << "got capability for " << iter->first << LL_ENDL; @@ -265,6 +267,53 @@ private: S32 mID; }; +class BaseCapabilitiesCompleteDebug : public LLHTTPClient::Responder +{ + LOG_CLASS(BaseCapabilitiesCompleteDebug); +public: + BaseCapabilitiesCompleteDebug( U64 region_handle, S32 id ) + : mRegionHandle(region_handle), mID(id) + { } + + virtual ~BaseCapabilitiesCompleteDebug() + { } + + void error(U32 statusNum, const std::string& reason) + { } + + void result(const LLSD& content) + { + LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); + if(!regionp || mID != regionp->getHttpResponderID()) + { + return ; + } + LLSD::map_const_iterator iter; + for(iter = content.beginMap(); iter != content.endMap(); ++iter) + { + regionp->setCapabilityDebug(iter->first, iter->second); + } + + if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() ) + { + llwarns<<"Sim sent duplicate seed caps that differ in size - most likely content."<getRegionImplNC()->mSecondCapabilitiesTracker.clear(); + } + + } + + static BaseCapabilitiesCompleteDebug* build( U64 region_handle, S32 id ) + { + return new BaseCapabilitiesCompleteDebug( region_handle, id ); + } + +private: + U64 mRegionHandle; + S32 mID; + +}; + LLViewerRegion::LLViewerRegion(const U64 &handle, const LLHost &host, @@ -1529,7 +1578,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("EventQueueGet"); if (gSavedSettings.getBOOL("UseHTTPInventory")) - { + { capabilityNames.append("FetchLib2"); capabilityNames.append("FetchLibDescendents2"); capabilityNames.append("FetchInventory2"); @@ -1595,8 +1644,14 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) void LLViewerRegion::setSeedCapability(const std::string& url) { if (getCapability("Seed") == url) - { - // llwarns << "Ignoring duplicate seed capability" << llendl; + { + //llwarns << "Ignoring duplicate seed capability" << llendl; + //Instead of just returning we build up a second set of seed caps and compare them + //to the "original" seed cap received and determine why there is problem! + LLSD capabilityNames = LLSD::emptyArray(); + mImpl->buildCapabilityNames( capabilityNames ); + LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteDebug::build(getHandle(), ++mImpl->mHttpResponderID ), + LLSD(), CAP_REQUEST_TIMEOUT ); return; } @@ -1732,6 +1787,11 @@ void LLViewerRegion::setCapability(const std::string& name, const std::string& u } } +void LLViewerRegion::setCapabilityDebug(const std::string& name, const std::string& url) +{ + mImpl->mSecondCapabilitiesTracker[name] = url; +} + bool LLViewerRegion::isSpecialCapabilityName(const std::string &name) { return name == "EventQueueGet" || name == "UntrustedSimulatorMessage"; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 20d96ad9ac..b5fe4677b7 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -241,6 +241,7 @@ public: void failedSeedCapability(); S32 getNumSeedCapRetries(); void setCapability(const std::string& name, const std::string& url); + void setCapabilityDebug(const std::string& name, const std::string& url); // implements LLCapabilityProvider virtual std::string getCapability(const std::string& name) const; @@ -339,7 +340,9 @@ public: void getNeighboringRegions( std::vector& uniqueRegions ); void getNeighboringRegionsStatus( std::vector& regions ); - + const LLViewerRegionImpl * getRegionImpl() const { return mImpl; } + LLViewerRegionImpl * getRegionImplNC() { return mImpl; } + public: struct CompareDistance { -- cgit v1.2.3 From eae5cd57eb76fb65e36a69df90fa0aedeaa26ec1 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Feb 2013 11:19:19 -0500 Subject: Renamed seedcap tracker class --- indra/newview/llviewerregion.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a7595a56d3..0033be2dbf 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -267,15 +267,15 @@ private: S32 mID; }; -class BaseCapabilitiesCompleteDebug : public LLHTTPClient::Responder +class BaseCapabilitiesCompleteTracker : public LLHTTPClient::Responder { - LOG_CLASS(BaseCapabilitiesCompleteDebug); + LOG_CLASS(BaseCapabilitiesCompleteTracker); public: - BaseCapabilitiesCompleteDebug( U64 region_handle, S32 id ) + BaseCapabilitiesCompleteTracker( U64 region_handle, S32 id ) : mRegionHandle(region_handle), mID(id) { } - virtual ~BaseCapabilitiesCompleteDebug() + virtual ~BaseCapabilitiesCompleteTracker() { } void error(U32 statusNum, const std::string& reason) @@ -296,16 +296,16 @@ public: if ( regionp->getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() ) { - llwarns<<"Sim sent duplicate seed caps that differ in size - most likely content."<getRegionImplNC()->mSecondCapabilitiesTracker.clear(); } } - static BaseCapabilitiesCompleteDebug* build( U64 region_handle, S32 id ) + static BaseCapabilitiesCompleteTracker* build( U64 region_handle, S32 id ) { - return new BaseCapabilitiesCompleteDebug( region_handle, id ); + return new BaseCapabilitiesCompleteTracker( region_handle, id ); } private: @@ -1651,7 +1651,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) //to the "original" seed cap received and determine why there is problem! LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames( capabilityNames ); - LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteDebug::build(getHandle(), ++mImpl->mHttpResponderID ), + LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle(), ++mImpl->mHttpResponderID ), LLSD(), CAP_REQUEST_TIMEOUT ); return; } -- cgit v1.2.3 From c14b43b5bf21365573608a4bac98b99cddd61d4d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Feb 2013 11:47:14 -0500 Subject: SH-3899 WIP - detailed logging of cof mismatch errors --- indra/newview/llappearancemgr.cpp | 70 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6df4822135..e12ecea760 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3096,11 +3096,71 @@ public: void debugCOF(const LLSD& content) { - //S32 cof_version = content["cof_version"]; - //S32 cof_expected = content["expected"]; - //S32 cof_observed = content["observed"]; + LL_DEBUGS("Avatar") << "AIS COF, version found: " << content["expected"].asInteger() << llendl; + std::set ais_items, local_items; + const LLSD& cof_raw = content["cof_raw"]; + for (LLSD::array_const_iterator it = cof_raw.beginArray(); + it != cof_raw.endArray(); ++it) + { + const LLSD& item = *it; + if (item["parent_id"].asUUID() == LLAppearanceMgr::instance().getCOF()) + { + ais_items.insert(item["item_id"].asUUID()); + if (item["type"].asInteger() == 24) // link + { + LL_DEBUGS("Avatar") << "Link: item_id: " << item["item_id"].asUUID() + << " linked_item_id: " << item["asset_id"].asUUID() + << " name: " << item["name"].asString() + << llendl; + } + else if (item["type"].asInteger() == 25) // folder link + { + LL_DEBUGS("Avatar") << "Folder link: item_id: " << item["item_id"].asUUID() + << " linked_item_id: " << item["asset_id"].asUUID() + << " name: " << item["name"].asString() + << llendl; + + } + else + { + LL_DEBUGS("Avatar") << "Other: item_id: " << item["item_id"].asUUID() + << " linked_item_id: " << item["asset_id"].asUUID() + << " name: " << item["name"].asString() + << llendl; + } + } + } + LL_DEBUGS("Avatar") << llendl; + LL_DEBUGS("Avatar") << "Local COF, version req: " << content["observed"] << llendl; + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), + cat_array,item_array,LLInventoryModel::EXCLUDE_TRASH); + for (S32 i=0; igetUUID()); + LL_DEBUGS("Avatar") << "item_id: " << inv_item->getUUID() + << " linked_item_id: " << inv_item->getLinkedUUID() + << " name: " << inv_item->getName() + << llendl; + } + LL_DEBUGS("Avatar") << llendl; + for (std::set::iterator it = local_items.begin(); it != local_items.end(); ++it) + { + if (ais_items.find(*it) == ais_items.end()) + { + LL_DEBUGS("Avatar") << "LOCAL ONLY: " << *it << llendl; + } + } + for (std::set::iterator it = ais_items.begin(); it != ais_items.end(); ++it) + { + if (local_items.find(*it) == local_items.end()) + { + LL_DEBUGS("Avatar") << "AIS ONLY: " << *it << llendl; + } + } } - LLPointer mRetryPolicy; }; @@ -3134,7 +3194,7 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond body["cof_version"] = cof_version; if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure")) { - body["cof_version"] = cof_version+1; + body["cof_version"] = cof_version+999; } LL_DEBUGS("Avatar") << "request url " << url << " my_cof_version " << cof_version << llendl; -- cgit v1.2.3 From f92a830730b8acf8930a439ed874f27f77102260 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Feb 2013 13:40:36 -0500 Subject: Bug fix# we don't want to be incrementing the responderid in the base responder --- indra/newview/llviewerregion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 0033be2dbf..9a1c5f89ef 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1651,7 +1651,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url) //to the "original" seed cap received and determine why there is problem! LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames( capabilityNames ); - LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle(), ++mImpl->mHttpResponderID ), + S32 responderID = mImpl->mHttpResponderID+1; + + LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle(), responderID ), LLSD(), CAP_REQUEST_TIMEOUT ); return; } -- cgit v1.2.3 From 22f05155990176ece57390e69de71deae9f34ed4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Feb 2013 14:53:53 -0500 Subject: SH-3899 WIP --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e12ecea760..48a2ab0eb2 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -3131,7 +3131,7 @@ public: } } LL_DEBUGS("Avatar") << llendl; - LL_DEBUGS("Avatar") << "Local COF, version req: " << content["observed"] << llendl; + LL_DEBUGS("Avatar") << "Local COF, version requested: " << content["observed"].asInteger() << llendl; LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; gInventory.collectDescendents(LLAppearanceMgr::instance().getCOF(), -- cgit v1.2.3 From ecb3d1d64d035f22c6d85864131cae6a1108fc68 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 28 Feb 2013 15:58:56 -0500 Subject: SH-3932 FIX - added LLSD blob for viewer-side cof contents, optionally included with request appearance update --- indra/newview/llappearancemgr.cpp | 25 +++++++++++++++++++++++++ indra/newview/llappearancemgr.h | 3 +++ 2 files changed, 28 insertions(+) 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 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; igetUUID(); + 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; -- cgit v1.2.3 From c9feefb714291fc80f9eadfda2e1ec5f68ad0a84 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 28 Feb 2013 16:22:27 -0500 Subject: WIP: Removed caching of responder id. Code to dump the new and old seed caps when we receive multiple seedcaps for a region. --- indra/newview/llviewerregion.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 9a1c5f89ef..e940dda010 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -271,8 +271,8 @@ class BaseCapabilitiesCompleteTracker : public LLHTTPClient::Responder { LOG_CLASS(BaseCapabilitiesCompleteTracker); public: - BaseCapabilitiesCompleteTracker( U64 region_handle, S32 id ) - : mRegionHandle(region_handle), mID(id) + BaseCapabilitiesCompleteTracker( U64 region_handle) + : mRegionHandle(region_handle) { } virtual ~BaseCapabilitiesCompleteTracker() @@ -284,34 +284,40 @@ public: void result(const LLSD& content) { LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle); - if(!regionp || mID != regionp->getHttpResponderID()) - { + if( !regionp ) + { return ; } LLSD::map_const_iterator iter; for(iter = content.beginMap(); iter != content.endMap(); ++iter) { - regionp->setCapabilityDebug(iter->first, iter->second); + regionp->setCapabilityDebug(iter->first, iter->second); + //llinfos<<"BaseCapabilitiesCompleteTracker New Caps "<first<<" "<< iter->second<getRegionImpl()->mCapabilities.size() != regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() ) { - llwarns<<"Sim sent duplicate seed caps that differs in size - most likely content."<getRegionImpl()->mCapabilities.begin(); + while (iter!=regionp->getRegionImpl()->mCapabilities.end() ) + { + llinfos<<"BaseCapabilitiesCompleteTracker Original "<first<<" "<< iter->second<getRegionImplNC()->mSecondCapabilitiesTracker.clear(); } } - static BaseCapabilitiesCompleteTracker* build( U64 region_handle, S32 id ) + static BaseCapabilitiesCompleteTracker* build( U64 region_handle ) { - return new BaseCapabilitiesCompleteTracker( region_handle, id ); + return new BaseCapabilitiesCompleteTracker( region_handle ); } private: - U64 mRegionHandle; - S32 mID; - + U64 mRegionHandle; }; @@ -1651,9 +1657,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url) //to the "original" seed cap received and determine why there is problem! LLSD capabilityNames = LLSD::emptyArray(); mImpl->buildCapabilityNames( capabilityNames ); - S32 responderID = mImpl->mHttpResponderID+1; - - LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle(), responderID ), + LLHTTPClient::post( url, capabilityNames, BaseCapabilitiesCompleteTracker::build(getHandle() ), LLSD(), CAP_REQUEST_TIMEOUT ); return; } -- cgit v1.2.3