diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-12-18 12:45:10 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-12-18 12:45:10 -0500 |
commit | 67c66a12ab0e169e9e1e86265ff57aa5aa758b2a (patch) | |
tree | 1a2cf70414d005031980cf6385728bf9813a8c88 | |
parent | 42496cd672436cc4d32f5546fd04294931b8f0b6 (diff) |
SH-3604 WIP - fixed a case with retry logic
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1044732f4b..4a484f3b85 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -199,14 +199,8 @@ public: void addItem(const LLUUID& item_id) { LL_DEBUGS("Avatar") << "item_id " << item_id << llendl; - - if (ll_frand()<gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) - { - // simulate server failure by not sending the request. - // do nothing - LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; - } - else if (!requestOperation(item_id)) + + if (!requestOperation(item_id)) { LL_DEBUGS("Avatar") << "item_id " << item_id << " requestOperation false, skipping" << llendl; return; @@ -384,6 +378,11 @@ public: LLViewerInventoryItem *item = gInventory.getItem(item_id); llassert(item); LL_DEBUGS("Avatar") << "copying item " << item_id << llendl; + if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) + { + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + return true; + } copy_inventory_item( gAgent.getID(), item->getPermissions().getOwner(), @@ -425,6 +424,11 @@ public: } LL_DEBUGS("Avatar") << "linking item " << item_id << " name " << item->getName() << " to " << mDstCatID << llendl; // create an inventory item link. + if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) + { + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + return true; + } link_inventory_item(gAgent.getID(), item->getLinkedUUID(), mDstCatID, @@ -433,7 +437,7 @@ public: LLAssetType::AT_LINK, new LLBoostFuncInventoryCallback( boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,item_id,_1,LLTimer()))); - request_sent = true; + return true; } else { @@ -451,6 +455,11 @@ public: if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT) { + if (ll_frand() < gSavedSettings.getF32("InventoryDebugSimulateOpFailureRate")) + { + LL_DEBUGS("Avatar") << "simulating failure by not sending request for item " << item_id << llendl; + return true; + } LL_DEBUGS("Avatar") << "linking folder " << item_id << " name " << catp->getName() << " to cof " << cof << llendl; link_inventory_item(gAgent.getID(), item_id, cof, catp->getName(), "", LLAssetType::AT_LINK_FOLDER, |