aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworld.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-13 13:01:57 -0700
committerJacek Antonelli2010-06-19 02:43:38 -0500
commitcad41f1ae08927737eca4cd9df25381d78e82304 (patch)
tree31c687f74defb0ebdcdcb5f97483312a8e612631 /linden/indra/newview/llworld.cpp
parentwip forcing region disconnects to log you out (diff)
downloadmeta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.zip
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.gz
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.bz2
meta-impy-cad41f1ae08927737eca4cd9df25381d78e82304.tar.xz
Fixed #338: addRegion/removeRegion can trigger a viewer quit
Diffstat (limited to 'linden/indra/newview/llworld.cpp')
-rw-r--r--linden/indra/newview/llworld.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 7cceb30..50d4250 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -267,11 +267,17 @@ void LLWorld::removeRegion(const LLHost &host)
267 267
268 llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl; 268 llwarns << "Disabling region " << regionp->getName() << " that agent is in!" << llendl;
269 269
270 // Don't ever forceQuit on the user if we can avoid it -- MC 270 // Don't ever forceQuit on the user during startup if we can avoid it -- MC
271 //LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); 271 //LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in.");
272 LLSD args; 272 // We stop a login, even if it's a successful one, as the expected behavior is to not receive
273 args["ERROR_MESSAGE"] = "You have been disconnected from the region you were in."; 273 // any more messages from a sim when we receive the DisableSimulator message, despite the viewer
274 LLNotifications::instance().add("ErrorMessage", args, LLSD(), connecting_alert_done); 274 // continuing to connect anyway -- MC
275 if (LLStartUp::getStartupState() < STATE_STARTED)
276 {
277 //LLStartUp::setLoginFailed(true);
278 LLStartUp::setStartupState(STATE_SEED_GRANTED_WAIT);
279 }
280 LLNotifications::instance().add("DisconnectedFromRegion", LLSD(), LLSD(), connecting_alert_done);
275 281
276 return; 282 return;
277 } 283 }
@@ -1256,13 +1262,13 @@ bool connecting_alert_done(const LLSD& notification, const LLSD& response)
1256{ 1262{
1257 if (LLStartUp::getStartupState() < STATE_STARTED) 1263 if (LLStartUp::getStartupState() < STATE_STARTED)
1258 { 1264 {
1259 //LLStartUp::setLoginFailed(true);
1260 LLStartUp::resetLogin(); 1265 LLStartUp::resetLogin();
1261 LLPanelLogin::giveFocus(); 1266 LLPanelLogin::giveFocus();
1262 } 1267 }
1263 else 1268 else
1264 { 1269 {
1265 LLAppViewer::instance()->requestLogout(false); 1270 // TODO: make this translatable
1271 LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in. Unable to continue.");
1266 } 1272 }
1267 return false; 1273 return false;
1268} 1274}