diff --git a/indra/llmessage/aicurlthread.cpp b/indra/llmessage/aicurlthread.cpp
index d1b61cd7b..ea3224321 100644
--- a/indra/llmessage/aicurlthread.cpp
+++ b/indra/llmessage/aicurlthread.cpp
@@ -838,6 +838,9 @@ class AICurlThread : public LLThread
// MAIN-THREAD
void stop_thread(void) { mRunning = false; wakeup_thread(); }
+ // MAIN-THREAD
+ apr_status_t join_thread(void);
+
protected:
virtual void run(void);
void wakeup(AICurlMultiHandle_wat const& multi_handle_w);
@@ -1110,6 +1113,17 @@ void AICurlThread::wakeup_thread(void)
#endif
}
+apr_status_t AICurlThread::join_thread(void)
+{
+ apr_status_t retval = APR_SUCCESS;
+ if (sInstance)
+ {
+ apr_thread_join(&retval, sInstance->mAPRThreadp);
+ delete sInstance;
+ }
+ return retval;
+}
+
void AICurlThread::wakeup(AICurlMultiHandle_wat const& multi_handle_w)
{
DoutEntering(dc::curl, "AICurlThread::wakeup");
@@ -2148,12 +2162,22 @@ void stopCurlThread(void)
if (AICurlThread::sInstance)
{
AICurlThread::sInstance->stop_thread();
- int count = 101;
+ int count = 401;
while(--count && !AICurlThread::sInstance->isStopped())
{
ms_sleep(10);
}
- Dout(dc::curl, "Curl thread" << (curlThreadIsRunning() ? " not" : "") << " stopped after " << ((100 - count) * 10) << "ms.");
+ if (AICurlThread::sInstance->isStopped())
+ {
+ // isStopped() returns true somewhere at the end of run(),
+ // but that doesn't mean the thread really stopped: it still
+ // needs to destroy it's static variables.
+ // If we don't join here, then there is a chance that the
+ // curl thread will crash when using globals that we (the
+ // main thread) will have destroyed before it REALLY finished.
+ AICurlThread::sInstance->join_thread(); // Wait till it is REALLY done.
+ }
+ llinfos << "Curl thread" << (curlThreadIsRunning() ? " not" : "") << " stopped after " << ((400 - count) * 10) << "ms." << llendl;
}
}
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 019ddd668..134363bce 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -162,10 +162,6 @@ public:
LLLoginRefreshHandler gLoginRefreshHandler;
-//
-std::string gFullName;
-//
-
// helper class that trys to download a URL from a web site and calls a method
// on parent class indicating if the web server is working or not
class LLIamHereLogin : public LLHTTPClient::ResponderHeadersOnly
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 53eb9b52d..1812b6fc7 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -41,10 +41,6 @@
class LLUIImage;
class LLComboBox;
-//
-extern std::string gFullName;
-//
-
class LLPanelLogin:
public LLPanel,
public LLViewerMediaObserver
@@ -165,8 +161,4 @@ private:
std::string load_password_from_disk(void);
void save_password_to_disk(const char* hashed_password);
-//
-extern std::string gFullName;
-//
-
#endif
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 6d1e2d92c..3d7f1869f 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -757,9 +757,6 @@ bool idle_startup()
// We have at least some login information on a SLURL
firstname = gLoginHandler.getFirstName();
lastname = gLoginHandler.getLastName();
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
web_login_key = gLoginHandler.getWebLoginKey();
// Show the login screen if we don't have everything
@@ -771,9 +768,6 @@ bool idle_startup()
LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
firstname = cmd_line_login[0].asString();
lastname = cmd_line_login[1].asString();
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
char md5pass[33]; /* Flawfinder: ignore */
@@ -791,9 +785,6 @@ bool idle_startup()
{
firstname = gSavedSettings.getString("FirstName");
lastname = gSavedSettings.getString("LastName");
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
password = LLStartUp::loadPasswordFromDisk();
gSavedSettings.setBOOL("RememberPassword", TRUE);
@@ -809,9 +800,6 @@ bool idle_startup()
// a valid grid is selected
firstname = gSavedSettings.getString("FirstName");
lastname = gSavedSettings.getString("LastName");
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
password = LLStartUp::loadPasswordFromDisk();
show_connect_box = true;
}
@@ -895,9 +883,6 @@ bool idle_startup()
else
{
LLPanelLogin::setFields(firstname, lastname, password);
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
LLPanelLogin::giveFocus();
}
display_startup();
@@ -969,9 +954,6 @@ bool idle_startup()
{
firstname = gLoginHandler.getFirstName();
lastname = gLoginHandler.getLastName();
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
web_login_key = gLoginHandler.getWebLoginKey();
}
@@ -990,15 +972,21 @@ bool idle_startup()
{
gSavedSettings.setString("FirstName", firstname);
gSavedSettings.setString("LastName", lastname);
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
if (!gSavedSettings.controlExists("RememberLogin")) gSavedSettings.declareBOOL("RememberLogin", false, "Remember login", false);
gSavedSettings.setBOOL("RememberLogin", LLPanelLogin::getRememberLogin());
LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
gDebugInfo["LoginName"] = firstname + " " + lastname;
}
+ else
+ {
+ // User tried to login on a non-SecondLife grid with an empty lastname.
+ LLSD subs;
+ subs["GRIDNAME"] = gHippoGridManager->getConnectedGrid()->getGridName();
+ LLNotificationsUtil::add(firstname.empty() ? "EmptyFirstNameMessage" : "EmptyLastNameMessage", subs);
+ LLStartUp::setStartupState(STATE_LOGIN_SHOW);
+ return FALSE;
+ }
LLScriptEdCore::parseFunctions("lsl_functions_sl.xml"); //Singu Note: This parsing function essentially replaces the entirety of the lscript_library library
@@ -4099,9 +4087,6 @@ bool process_login_success_response(std::string& password)
if(!text.empty()) lastname.assign(text);
gSavedSettings.setString("FirstName", firstname);
gSavedSettings.setString("LastName", lastname);
- //
- gFullName = utf8str_tolower(firstname + " " + lastname);
- //
if (gSavedSettings.getBOOL("RememberPassword"))
{
diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml
index 4a4463b65..7c510e609 100644
--- a/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -264,6 +264,22 @@ An error occurred while updating [APP_NAME]. Please download the latest version
yestext="Ok"/>
+
+[GRIDNAME] requires a non-empty first name to login.
+Please try again.
+
+
+
+[GRIDNAME] requires a non-empty last name to login.
+Please try again.
+
+