diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-01-21 22:33:17 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-01-22 16:06:30 +0200 |
commit | 831f7d6b7b05414067d24ec43c5b17eb65169a5c (patch) | |
tree | 1b364959014eedcb47437c8396affdbae6d15643 /indra | |
parent | 01bd15d4be5b59cca8d49bb29eb9368c80b53f13 (diff) |
#3431 Try to log out if login failed due to missing caps
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llstartup.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8ccd4f1dbf..6c3f3849ce 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1394,7 +1394,7 @@ bool idle_startup() } else if (regionp->capabilitiesError()) { - LL_WARNS("AppInit") << "Failed to get capabilities. Backing up to login screen!" << LL_ENDL; + LL_WARNS("AppInit") << "Failed to get capabilities. Logging out and backing up to login screen!" << LL_ENDL; if (gRememberPassword) { LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); @@ -1403,6 +1403,15 @@ bool idle_startup() { LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status); } + + // Session was created, don't just hang up on server, send a logout request + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_LogoutRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gAgent.sendReliableMessage(); + reset_login(); } else @@ -1410,7 +1419,7 @@ bool idle_startup() U32 num_retries = regionp->getNumSeedCapRetries(); if (num_retries > MAX_SEED_CAP_ATTEMPTS_BEFORE_ABORT) { - LL_WARNS("AppInit") << "Failed to get capabilities. Backing up to login screen!" << LL_ENDL; + LL_WARNS("AppInit") << "Failed to get capabilities. Logging out and backing up to login screen!" << LL_ENDL; if (gRememberPassword) { LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); @@ -1419,6 +1428,15 @@ bool idle_startup() { LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status); } + + // Session was created, don't just hang up on server, send a logout request + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_LogoutRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gAgent.sendReliableMessage(); + reset_login(); } else if (num_retries > 0) @@ -1721,7 +1739,7 @@ bool idle_startup() if (!gAgentMovementCompleted && timeout.getElapsedTimeF32() > STATE_AGENT_WAIT_TIMEOUT) { - LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL; + LL_WARNS("AppInit") << "Timeout on agent movement. Sending logout and backing up to login screen!" << LL_ENDL; if (gRememberPassword) { LLNotificationsUtil::add("LoginPacketNeverReceived", LLSD(), LLSD(), login_alert_status); @@ -1730,6 +1748,15 @@ bool idle_startup() { LLNotificationsUtil::add("LoginPacketNeverReceivedNoTP", LLSD(), LLSD(), login_alert_status); } + + // Session was created, don't just hang up on server, send a logout request + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_LogoutRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gAgent.sendReliableMessage(); + reset_login(); } return false; |