summaryrefslogtreecommitdiff
path: root/indra/newview/llmarketplacefunctions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-03-01 13:21:16 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-03-01 13:41:42 +0200
commit97a103255e433629f13e2156aa307ca329cdcfc6 (patch)
treebf5de1cef5930647c4ab87a0cff7f88f0007832d /indra/newview/llmarketplacefunctions.cpp
parent92c302d6fba687f0921544b278e22b698d058646 (diff)
parent6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff)
Merge branch 'master' (DRTVWR-557) into DRTVWR-546
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/cmake/GLOD.cmake # indra/llcommon/tests/llprocess_test.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolavatar.cpp # indra/newview/llfloatermodelpreview.cpp # indra/newview/llmodelpreview.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvovolume.cpp # indra/newview/viewer_manifest.py
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rw-r--r--indra/newview/llmarketplacefunctions.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index aa0c7fb73b..044c76ce2c 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -1025,6 +1025,12 @@ void LLMarketplaceData::createSLMListingCoro(LLUUID folderId, LLUUID versionId,
log_SLM_infos("Post /listings", status.getType(), result);
+ if (!result.has("listings") || !result["listings"].isArray() || result["listings"].size() == 0)
+ {
+ LL_INFOS("SLM") << "Received an empty response for folder " << folderId << LL_ENDL;
+ return;
+ }
+
// Extract the info from the results
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)
@@ -1092,6 +1098,19 @@ void LLMarketplaceData::updateSLMListingCoro(LLUUID folderId, S32 listingId, LLU
log_SLM_infos("Put /listing", status.getType(), result);
+ if (!result.has("listings") || !result["listings"].isArray() || result["listings"].size() == 0)
+ {
+ LL_INFOS("SLM") << "Received an empty response for listing " << listingId << " folder " << folderId << LL_ENDL;
+ // Try to get listing more directly after a delay
+ const float FORCE_UPDATE_TIMEOUT = 5.0;
+ llcoro::suspendUntilTimeout(FORCE_UPDATE_TIMEOUT);
+ if (!LLApp::isExiting() && LLMarketplaceData::instanceExists())
+ {
+ getSLMListing(listingId);
+ }
+ return;
+ }
+
// Extract the info from the Json string
for (LLSD::array_iterator it = result["listings"].beginArray();
it != result["listings"].endArray(); ++it)