diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:55:28 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-02-28 21:55:28 +0200 |
commit | 201f83472c604e837b40c12f3750602e30d79d0b (patch) | |
tree | b5e983c44eb9913c5778f0773ac986d6bf038e20 /indra/newview/llmarketplacefunctions.cpp | |
parent | 696795a368a8825fb083627e39f65dcc30266122 (diff) | |
parent | 6ca09a94554ec01f5c94ec60fffd01d7e33f3546 (diff) |
Merge branch 'master' into DRTVWR-543-maint
Diffstat (limited to 'indra/newview/llmarketplacefunctions.cpp')
-rw-r--r-- | indra/newview/llmarketplacefunctions.cpp | 19 |
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) |