From 1897e6ce87d260364d2aad1b1f3fa67e5f2e0d04 Mon Sep 17 00:00:00 2001
From: Merov Linden <merov@lindenlab.com>
Date: Wed, 27 Nov 2013 12:20:06 -0800
Subject: ACME-1221 : Do not clear merchant import cookie on 404, happens to
 newly minted merchants

---
 indra/newview/llmarketplacefunctions.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'indra')

diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index f01a3de16c..05c9d76810 100755
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -192,9 +192,11 @@ namespace LLMarketplaceImport
 				llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;
 			}
 			
-            // MAINT-2452 : Do not clear the cookie on IMPORT_DONE_WITH_ERRORS
+            // MAINT-2452 : Do not clear the cookie on IMPORT_DONE_WITH_ERRORS : Happens when trying to import objects with wrong permissions
+            // ACME-1221 : Do not clear the cookie on IMPORT_NOT_FOUND : Happens for newly created Merchant accounts that are initally empty
 			if ((status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
-                (status != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS))
+                (status != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) &&
+                (status != MarketplaceErrorCodes::IMPORT_NOT_FOUND))
 			{
 				if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
 				{
@@ -202,9 +204,9 @@ namespace LLMarketplaceImport
 				}
 				sMarketplaceCookie.clear();
 			}
-            else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (status == MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS))
+            else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST))
             {
-                llinfos << " SLM GET : Got IMPORT_DONE_WITH_ERRORS, marketplace cookie not cleared." << llendl;
+                llinfos << " SLM GET : Got error status = " << status << ", but marketplace cookie not cleared." << llendl;
             }
 
 			sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING);
-- 
cgit v1.2.3