summaryrefslogtreecommitdiff
path: root/indra/newview/llloginhandler.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-03-10 09:27:49 +0000
committerLynx Linden <lynx@lindenlab.com>2010-03-10 09:27:49 +0000
commit983d633a3c2d41cef1e6a85a1d6a7432f091012b (patch)
tree13783f3bf6cedc7105f49ce361926c51fc407c1a /indra/newview/llloginhandler.cpp
parentcaa1435ae0afa0e4ac2fe42fc8dc67dd93cdb524 (diff)
EXT-6114: Ignore secondlife:///app/login SLapps if logged in.
If you were already logged in, clicking on these SLapps would crash your viewer (crash was in experimental reg-in-client code). We now ignore these SLapps if the user is already logged in, and a one-time warning is emitted in this case.
Diffstat (limited to 'indra/newview/llloginhandler.cpp')
-rw-r--r--indra/newview/llloginhandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp
index 1be3430e07..e3817eecc4 100644
--- a/indra/newview/llloginhandler.cpp
+++ b/indra/newview/llloginhandler.cpp
@@ -35,6 +35,7 @@
#include "llloginhandler.h"
// viewer includes
+#include "lllogininstance.h" // to check if logged in yet
#include "llpanellogin.h" // save_password_to_disk()
#include "llstartup.h" // getStartupState()
#include "llurlsimstring.h"
@@ -169,6 +170,13 @@ bool LLLoginHandler::handle(const LLSD& tokens,
const LLSD& query_map,
LLMediaCtrl* web)
{
+ // do nothing if we are already logged in
+ if (LLLoginInstance::getInstance()->authSuccess())
+ {
+ LL_WARNS_ONCE("SLURL") << "Already logged in! Ignoring login SLapp." << LL_ENDL;
+ return true;
+ }
+
if (tokens.size() == 1
&& tokens[0].asString() == "show")
{