summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-08 21:04:04 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-08-08 21:04:04 +0300
commitce0300e9668318d061046e309ae0e0b618b8a099 (patch)
treecb5b42807e9fff26460839af2736177db206b5fe /indra
parentcd8fcec5fefd607957ef2560fbe92241795c091b (diff)
SL-20131 Don't let viewer in without caps
Previously was bounced to login screen on error only, now should be bounced back if failed too many times as well
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llstartup.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index c925563919..5511ab2c62 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -256,7 +256,7 @@ static bool mLoginStatePastUI = false;
static bool mBenefitsSuccessfullyInit = false;
const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds
-const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN = 3; // Give region 3 chances
+const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_ABORT = 4; // Give region 4 chances
std::unique_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
std::unique_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
@@ -1409,11 +1409,18 @@ bool idle_startup()
else
{
U32 num_retries = regionp->getNumSeedCapRetries();
- if (num_retries > MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN)
+ if (num_retries > MAX_SEED_CAP_ATTEMPTS_BEFORE_ABORT)
{
- // Region will keep trying to get capabilities,
- // but for now continue as if caps were granted
- LLStartUp::setStartupState(STATE_SEED_CAP_GRANTED);
+ LL_WARNS("AppInit") << "Failed to get capabilities. Backing up to login screen!" << LL_ENDL;
+ if (gRememberPassword)
+ {
+ LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status);
+ }
+ else
+ {
+ LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status);
+ }
+ reset_login();
}
else if (num_retries > 0)
{