[MAINT-2287] The rest of the updates so far to outbox.

This commit is contained in:
Inusaito Sayori
2014-02-06 14:53:13 -05:00
parent b6225d1d9a
commit eb4b0d630f
7 changed files with 156 additions and 31 deletions

View File

@@ -231,9 +231,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 initially 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"))
{
@@ -241,9 +243,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);
@@ -306,13 +308,15 @@ namespace LLMarketplaceImport
std::string url = getInventoryImportURL();
AIHTTPHeaders headers = LLViewerMedia::getHeaders();
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
{
llinfos << " SLM GET: " << url << llendl;
llinfos << " SLM GET: establishMarketplaceSessionCookie, LLHTTPClient::get, url = " << url << llendl;
llinfos << " SLM GET: headers " << llendl;
llinfos << headers << llendl;
}
slmGetTimer.start();
AIHTTPHeaders headers = LLViewerMedia::getHeaders();
LLHTTPClient::get(url, new LLImportGetResponder(), headers);
return true;
@@ -453,7 +457,10 @@ boost::signals2::connection LLMarketplaceInventoryImporter::setStatusReportCallb
void LLMarketplaceInventoryImporter::initialize()
{
llassert(!mInitialized);
if (mInitialized)
{
return;
}
if (!LLMarketplaceImport::hasSessionCookie())
{