From 65a5856f9567074886f28df59a26433c4b447576 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 11 Jun 2010 12:23:46 -0700 Subject: wip forcing region disconnects to log you out --- linden/indra/newview/llstartup.cpp | 4 ++-- linden/indra/newview/llworld.cpp | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 82b950e..8882773 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2080,7 +2080,7 @@ bool idle_startup() LLHUDManager::getInstance()->sendEffects(); } - // Drop out if we can't connect after TIMEOUT_SECONDS -- MC + // Drop out if we can't connect -- MC connecting_region_timer.start(); LLStartUp::setStartupState( STATE_AGENT_WAIT ); // Go to STATE_AGENT_WAIT @@ -2095,7 +2095,7 @@ bool idle_startup() if (STATE_AGENT_WAIT == LLStartUp::getStartupState()) { LL_DEBUGS("AppInitStartupState") << "STATE_AGENT_WAIT" << LL_ENDL; - if (connecting_region_timer.getElapsedTimeF32() > TIMEOUT_SECONDS) + if (connecting_region_timer.getElapsedTimeF32() > 15.0f) { // Bounce back to the login screen -- MC LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp index 90ab49b..7cceb30 100644 --- a/linden/indra/newview/llworld.cpp +++ b/linden/indra/newview/llworld.cpp @@ -43,7 +43,9 @@ #include "lldrawpool.h" #include "llglheaders.h" #include "llhttpnode.h" +#include "llpanellogin.h" #include "llregionhandle.h" +#include "llstartup.h" #include "llsurface.h" #include "llviewercamera.h" #include "llviewerimage.h" @@ -84,6 +86,7 @@ const F32 LLWorld::mWidthInMeters = mWidth * mScale; // // Functions // +bool connecting_alert_done(const LLSD& notification, const LLSD& response); // allocate the stack LLWorld::LLWorld() : @@ -263,7 +266,13 @@ void LLWorld::removeRegion(const LLHost &host) llwarns << "gFrameTimeSeconds " << gFrameTimeSeconds << llendl; llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; - LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); + + // Don't ever forceQuit on the user if we can avoid it -- MC + //LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); + LLSD args; + args["ERROR_MESSAGE"] = "You have been disconnected from the region you were in."; + LLNotifications::instance().add("ErrorMessage", args, LLSD(), connecting_alert_done); + return; } @@ -1243,6 +1252,20 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorrequestLogout(false); + } + return false; +} LLHTTPRegistration gHTTPRegistrationEstablishAgentCommunication( -- cgit v1.1