From 652ef621543497aa947970d374285d8f851ed682 Mon Sep 17 00:00:00 2001
From: Leslie Linden <leslie@lindenlab.com>
Date: Tue, 17 Jan 2012 15:51:30 -0800
Subject: [PATCH] EXP-1791 FIX -- Handle case where initialization with SLM
 fails in the Merchant Outbox floater in the viewer

* Timeout now triggers the re-initialization logic in the merchant outbox.
---
 indra/newview/llmarketplacefunctions.cpp | 10 ++++++----
 indra/newview/llmarketplacefunctions.h   |  1 +
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index ee7505c4f41..a3f0a6062c8 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -132,11 +132,12 @@ namespace LLMarketplaceImport
 			}
 
 			if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) ||
-				(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR))
+				(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
+				(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
 			{
 				if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
 				{
-					llinfos << " SLM POST clearing marketplace cookie due to authentication failure" << llendl;
+					llinfos << " SLM POST clearing marketplace cookie due to authentication failure or timeout" << llendl;
 				}
 
 				sMarketplaceCookie.clear();
@@ -173,11 +174,12 @@ namespace LLMarketplaceImport
 				llinfos << " SLM GET content: " << content.asString() << llendl;
 			}
 			
-			if (status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR)
+			if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
+				(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
 			{
 				if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
 				{
-					llinfos << " SLM GET clearing marketplace cookie due to authentication failure" << llendl;
+					llinfos << " SLM GET clearing marketplace cookie due to authentication failure or timeout" << llendl;
 				}
 
 				sMarketplaceCookie.clear();
diff --git a/indra/newview/llmarketplacefunctions.h b/indra/newview/llmarketplacefunctions.h
index 47315663661..4b8f7a1ac77 100644
--- a/indra/newview/llmarketplacefunctions.h
+++ b/indra/newview/llmarketplacefunctions.h
@@ -50,6 +50,7 @@ namespace MarketplaceErrorCodes
 		IMPORT_AUTHENTICATION_ERROR = 401,
 		IMPORT_DONE_WITH_ERRORS = 409,
 		IMPORT_JOB_FAILED = 410,
+		IMPORT_JOB_TIMEOUT = 499,
 	};
 }
 
-- 
GitLab