summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llappviewer.cpp22
-rw-r--r--indra/newview/llappviewer.h4
2 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 3eb0479341..ac9464d86e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4530,6 +4530,7 @@ void LLAppViewer::forceDisconnect(const std::string& mesg)
}
else
{
+ sendSimpleLogoutRequest();
args["MESSAGE"] = big_reason;
LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect );
}
@@ -5310,6 +5311,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())
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 132d7bfe25..e7de2d9b28 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -310,6 +310,10 @@ private:
void sendLogoutRequest();
void disconnectViewer();
+ // Does not create a marker file. For lost network case,
+ // to at least attempt to remove the ghost from the world.
+ void sendSimpleLogoutRequest();
+
// *FIX: the app viewer class should be some sort of singleton, no?
// Perhaps its child class is the singleton and this should be an abstract base.
static LLAppViewer* sInstance;