summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-06-22 13:50:51 -0700
committerRider Linden <rider@lindenlab.com>2016-06-22 13:50:51 -0700
commitd5a9821d526f1da465ff4fd533893b127a350d85 (patch)
tree17e6897af85ae98c4c2002c44e2c4887f9262e16 /indra/newview
parent855ba82806893f21e44442209865a691ee1b8938 (diff)
parent0a9f25bcfbc977cf894e83fda95d7ff693039923 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp24
-rw-r--r--indra/newview/llagent.h2
-rw-r--r--indra/newview/llmarketplacefunctions.cpp4
-rw-r--r--indra/newview/llviewermenu.cpp10
-rw-r--r--indra/newview/llviewermenu.h2
5 files changed, 31 insertions, 11 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index d933537d2e..d8b0787852 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3895,11 +3895,17 @@ void LLAgent::handleTeleportFinished()
mIsMaturityRatingChangingDuringTeleport = false;
}
- // Init SLM Marketplace connection so we know which UI should be used for the user as a merchant
- // Note: Eventually, all merchant will be migrated to the new SLM system and there will be no reason to show the old UI at all.
- // Note: Some regions will not support the SLM cap for a while so we need to do that check for each teleport.
- // *TODO : Suppress that line from here once the whole grid migrated to SLM and move it to idle_startup() (llstartup.cpp)
- check_merchant_status();
+ if (mRegionp)
+ {
+ if (mRegionp->capabilitiesReceived())
+ {
+ onCapabilitiesReceivedAfterTeleport();
+ }
+ else
+ {
+ mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::onCapabilitiesReceivedAfterTeleport));
+ }
+ }
}
void LLAgent::handleTeleportFailed()
@@ -3931,6 +3937,14 @@ void LLAgent::handleTeleportFailed()
}
}
+/*static*/
+void LLAgent::onCapabilitiesReceivedAfterTeleport()
+{
+
+ check_merchant_status();
+}
+
+
void LLAgent::teleportRequest(
const U64& region_handle,
const LLVector3& pos_local,
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 3a533c2cba..d82ff7a67f 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -676,6 +676,8 @@ private:
void handleTeleportFinished();
void handleTeleportFailed();
+ static void onCapabilitiesReceivedAfterTeleport();
+
//--------------------------------------------------------------------
// Teleport State
//--------------------------------------------------------------------
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 6cc7a0fc99..54f95520db 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -773,7 +773,9 @@ void LLMarketplaceData::getMerchantStatusCoro()
std::string url = getSLMConnectURL("/merchant");
if (url.empty())
{
- LL_INFOS("Marketplace") << "No marketplace capability on Sim" << LL_ENDL;
+ LL_WARNS("Marketplace") << "No marketplace capability on Sim" << LL_ENDL;
+ setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_CONNECTION_FAILURE);
+ return;
}
LLSD result = httpAdapter->getAndSuspend(httpRequest, url, httpOpts);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 99a9ed1d75..5790fa4c46 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -397,13 +397,15 @@ void set_merchant_SLM_menu()
gToolBarView->enableCommand(command->id(), true);
}
-void check_merchant_status()
+void check_merchant_status(bool force)
{
if (!gSavedSettings.getBOOL("InventoryOutboxDisplayBoth"))
{
- // Reset the SLM status: we actually want to check again, that's the point of calling check_merchant_status()
- LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED);
-
+ if (force)
+ {
+ // Reset the SLM status: we actually want to check again, that's the point of calling check_merchant_status()
+ LLMarketplaceData::instance().setSLMStatus(MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED);
+ }
// Hide SLM related menu item
gMenuHolder->getChild<LLView>("MarketplaceListings")->setVisible(FALSE);
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index b7bdf00157..2f9bf7f714 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -83,7 +83,7 @@ BOOL enable_god_full(void* user_data);
BOOL enable_god_liaison(void* user_data);
BOOL enable_god_basic(void* user_data);
void set_underclothes_menu_options();
-void check_merchant_status();
+void check_merchant_status(bool force = false);
void exchange_callingcard(const LLUUID& dest_id);