diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-05-15 12:37:13 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-05-15 12:43:19 +0300 |
commit | 2cc76d0bd078869667b44f8bf7b1676205b84bbe (patch) | |
tree | 28b7fb81f7606229b4b9cae9384c689bcaee3730 /indra | |
parent | 9a1688322ab739f8838611d1b9e37d33adc07dfb (diff) |
SL-14388 Listing status issues
Log issue and try to recover
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llmarketplacefunctions.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llviewerjoystick.h | 1 |
2 files changed, 20 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) diff --git a/indra/newview/llviewerjoystick.h b/indra/newview/llviewerjoystick.h index 782c523d4f..3b4f898710 100644 --- a/indra/newview/llviewerjoystick.h +++ b/indra/newview/llviewerjoystick.h @@ -47,6 +47,7 @@ class LLViewerJoystick : public LLSingleton<LLViewerJoystick> { LLSINGLETON(LLViewerJoystick); virtual ~LLViewerJoystick(); + LOG_CLASS(LLViewerJoystick); public: void init(bool autoenable); |