diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 551d4fc5d9..98a1fd740b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4594,6 +4594,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) } else { + sendSimpleLogoutRequest(); args["MESSAGE"] = big_reason; LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect ); } @@ -5374,6 +5375,27 @@ void LLAppViewer::sendLogoutRequest() } } +void LLAppViewer::sendSimpleLogoutRequest() +{ + if (!mLogoutRequestSent && gMessageSystem) + { + gLogoutInProgress = true; + + 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(); + + LL_INFOS("Agent") << "Logging out as agent: " << gAgent.getID() << " Session: " << gAgent.getSessionID() << LL_ENDL; + + gLogoutTimer.reset(); + gLogoutMaxTime = LOGOUT_REQUEST_TIME; + mLogoutRequestSent = true; + } +} + void LLAppViewer::updateNameLookupUrl(const LLViewerRegion * regionp) { if (!regionp || !regionp->capabilitiesReceived()) |