summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodelbackgroundfetch.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-07 20:12:09 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-04-07 20:12:22 +0300
commit43ff8108f2d056b84ab2a7586951ad363c350f05 (patch)
treebcf42853d43f8ab92e6e18cdb871bcfd5e161f96 /indra/newview/llinventorymodelbackgroundfetch.cpp
parent7df076b62682b7e9749bb402958a3ea6735be283 (diff)
SL-19534 Better fetch failure handling
Diffstat (limited to 'indra/newview/llinventorymodelbackgroundfetch.cpp')
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index c8bf8f67ce..e988f949e2 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -487,6 +487,26 @@ void LLInventoryModelBackgroundFetch::onAISFodlerCalback(const LLUUID &request_i
mFetchFolderQueue.push_front(FetchQueueInfo(request_id, FT_CONTENT_RECURSIVE));
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
+ else if (recursion == FT_CONTENT_RECURSIVE)
+ {
+ LL_WARNS() << "Failed to download folder: " << request_id << " Requesting known content separately" << LL_ENDL;
+ LLInventoryModel::cat_array_t *categories(NULL);
+ LLInventoryModel::item_array_t *items(NULL);
+ gInventory.getDirectDescendentsOf(request_id, categories, items);
+ if (categories)
+ {
+ for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); it != categories->end(); ++it)
+ {
+ mFetchFolderQueue.push_front(FetchQueueInfo((*it)->getUUID(), FT_RECURSIVE));
+ }
+ if (!mFetchFolderQueue.empty())
+ {
+ mBackgroundFetchActive = true;
+ mFolderFetchActive = true;
+ gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+ }
+ }
+ }
}
else
{