summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llstartup.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 4c322810d5..2c1f468f77 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -744,6 +744,7 @@ bool idle_startup()
// We have at least some login information on a SLURL
gFirstname = gLoginHandler.getFirstName();
gLastname = gLoginHandler.getLastName();
+ LL_DEBUGS("LLStartup") << "STATE_FIRST: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL;
// Show the login screen if we don't have everything
show_connect_box =
@@ -754,6 +755,7 @@ bool idle_startup()
LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
gFirstname = cmd_line_login[0].asString();
gLastname = cmd_line_login[1].asString();
+ LL_DEBUGS("LLStartup") << "Setting gFirstname, gLastname from gSavedSettings(\"UserLoginInfo\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL;
LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
char md5pass[33]; /* Flawfinder: ignore */
@@ -771,6 +773,7 @@ bool idle_startup()
{
gFirstname = gSavedSettings.getString("FirstName");
gLastname = gSavedSettings.getString("LastName");
+ LL_DEBUGS("LLStartup") << "AutoLogin: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL;
gPassword = LLStartUp::loadPasswordFromDisk();
gSavedSettings.setBOOL("RememberPassword", TRUE);
@@ -786,6 +789,7 @@ bool idle_startup()
// a valid grid is selected
gFirstname = gSavedSettings.getString("FirstName");
gLastname = gSavedSettings.getString("LastName");
+ LL_DEBUGS("LLStartup") << "normal login: setting gFirstname, gLastname from gSavedSettings(\"First|LastName\"): '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL;
gPassword = LLStartUp::loadPasswordFromDisk();
show_connect_box = true;
}
@@ -896,8 +900,15 @@ bool idle_startup()
gViewerWindow->moveProgressViewToFront();
//reset the values that could have come in from a slurl
- gFirstname = gLoginHandler.getFirstName();
- gLastname = gLoginHandler.getLastName();
+ // DEV-42215: Make sure they're not empty -- gFirstname and gLastname
+ // might already have been set from gSavedSettings, and it's too bad
+ // to overwrite valid values with empty strings.
+ if (! gLoginHandler.getFirstName().empty() && ! gLoginHandler.getLastName().empty())
+ {
+ gFirstname = gLoginHandler.getFirstName();
+ gLastname = gLoginHandler.getLastName();
+ LL_DEBUGS("LLStartup") << "STATE_LOGIN_CLEANUP: setting gFirstname, gLastname from gLoginHandler: '" << gFirstname << "' '" << gLastname << "'" << LL_ENDL;
+ }
if (show_connect_box)
{