diff options
author | Josh Bell <josh@lindenlab.com> | 2008-02-28 18:15:01 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2008-02-28 18:15:01 +0000 |
commit | 2fdd7c35f33d1d98091547b8e96ad9ebf99dee47 (patch) | |
tree | 247ba5247139531ac636bb8b9db7ddf3d5ce6203 /indra/newview/llviewerinventory.cpp | |
parent | 42bc4ba02abebced9fc3e7f91317ae293cbd20dd (diff) |
svn merge -r 80357:80990 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-19-1-Server --> release
Merge patches from 1.19.1 Server branch:
* QAR-293 Fix for hardcoded TTLs in web dataservices
* DEV-10826 fix for busted binary and notation parse if handed an unlimited parse size
* Bounce apache2 processes before starting backbone/dataserver/simulator
* Changing web-ds TTL in a way that any query that has 0 < ttl <=60 will have ttl = 61.
* Partial reversion of multiagent-chat to 1.19.0 to address fast memory leak
* Fixed minor, non user facing bug in multiagentchat
* set-classified-stats: Rewrote to use new MDB2 query reformatting syntax
* Fixed possible bad conversion of vivox data
* DEV-550, caching changes to DirClassifieds Query
* QAR-240 (DEV-8488) Prevent residents from purging stuff that isn't trash on the backend
* More mem leak fixes for multiagent-chat
* QAR-274 Fetch inventory descendents over TCP (via HTTP cap) instead of UDP
* DEV-10151: Sometimes group IMs appear to be person to person IMs
* QAR-321 Changes to crash_reporter
* DEV-11004 Speed up people search query using FORCE INDEX (PRIMARY) on the username table if the first-name query fragment is >= 3 chars
* DEV-11004 Speed up people search query using FORCE INDEX (PRIMARY). Web service version of this, must use two named queries because we need to change the query based on input string length.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 981605d1fa..01feff9b3c 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -48,6 +48,8 @@ #include "llviewerregion.h" #include "llviewerobjectlist.h" #include "llpreviewgesture.h" +#include "llviewerwindow.h" + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -213,6 +215,14 @@ void LLViewerInventoryItem::fetchFromServer(void) const } // virtual +BOOL LLViewerInventoryItem::unpackMessage(LLSD item) +{ + BOOL rv = LLInventoryItem::fromLLSD(item); + mIsComplete = TRUE; + return rv; +} + +// virtual BOOL LLViewerInventoryItem::unpackMessage( LLMessageSystem* msg, const char* block, S32 block_num) { @@ -420,30 +430,42 @@ void LLViewerInventoryCategory::removeFromServer( void ) bool LLViewerInventoryCategory::fetchDescendents() { if((VERSION_UNKNOWN == mVersion) - && mDescendentsRequested.hasExpired()) + && mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads. { const F32 FETCH_TIMER_EXPIRY = 10.0f; mDescendentsRequested.reset(); mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY); - LLMessageSystem* msg = gMessageSystem; - msg->newMessage("FetchInventoryDescendents"); - msg->nextBlock("AgentData"); - msg->addUUID("AgentID", gAgent.getID()); - msg->addUUID("SessionID", gAgent.getSessionID()); - msg->nextBlock("InventoryData"); - msg->addUUID("FolderID", mUUID); - msg->addUUID("OwnerID", mOwnerID); // bitfield // 1 = by date // 2 = folders by date // Need to mask off anything but the first bit. // This comes from LLInventoryFilter from llfolderview.h U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1; - msg->addS32("SortOrder", sort_order); - msg->addBOOL("FetchFolders", FALSE); - msg->addBOOL("FetchItems", TRUE); - gAgent.sendReliableMessage(); + + std::string url = gAgent.getRegion()->getCapability("FetchInventoryDescendents"); + + if (!url.empty()) //Capability found. Build up LLSD and use it. + { + LLInventoryModel::startBackgroundFetch(mUUID); + } + else + { //Deprecated, but if we don't have a capability, use the old system. + llinfos << "FetchInventoryDescendents capability not found. Using deprecated UDP message." << llendl; + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("FetchInventoryDescendents"); + msg->nextBlock("AgentData"); + msg->addUUID("AgentID", gAgent.getID()); + msg->addUUID("SessionID", gAgent.getSessionID()); + msg->nextBlock("InventoryData"); + msg->addUUID("FolderID", mUUID); + msg->addUUID("OwnerID", mOwnerID); + + msg->addS32("SortOrder", sort_order); + msg->addBOOL("FetchFolders", FALSE); + msg->addBOOL("FetchItems", TRUE); + gAgent.sendReliableMessage(); + } return true; } return false; |