#3431 Try to log out if login failed due to missing caps
parent
01bd15d4be
commit
831f7d6b7b
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue