Merge branch 'master' into llwebprofile
This commit is contained in:
@@ -838,6 +838,9 @@ class AICurlThread : public LLThread
|
|||||||
// MAIN-THREAD
|
// MAIN-THREAD
|
||||||
void stop_thread(void) { mRunning = false; wakeup_thread(); }
|
void stop_thread(void) { mRunning = false; wakeup_thread(); }
|
||||||
|
|
||||||
|
// MAIN-THREAD
|
||||||
|
apr_status_t join_thread(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void run(void);
|
virtual void run(void);
|
||||||
void wakeup(AICurlMultiHandle_wat const& multi_handle_w);
|
void wakeup(AICurlMultiHandle_wat const& multi_handle_w);
|
||||||
@@ -1110,6 +1113,17 @@ void AICurlThread::wakeup_thread(void)
|
|||||||
#endif
|
#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)
|
void AICurlThread::wakeup(AICurlMultiHandle_wat const& multi_handle_w)
|
||||||
{
|
{
|
||||||
DoutEntering(dc::curl, "AICurlThread::wakeup");
|
DoutEntering(dc::curl, "AICurlThread::wakeup");
|
||||||
@@ -2148,12 +2162,22 @@ void stopCurlThread(void)
|
|||||||
if (AICurlThread::sInstance)
|
if (AICurlThread::sInstance)
|
||||||
{
|
{
|
||||||
AICurlThread::sInstance->stop_thread();
|
AICurlThread::sInstance->stop_thread();
|
||||||
int count = 101;
|
int count = 401;
|
||||||
while(--count && !AICurlThread::sInstance->isStopped())
|
while(--count && !AICurlThread::sInstance->isStopped())
|
||||||
{
|
{
|
||||||
ms_sleep(10);
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,10 +162,6 @@ public:
|
|||||||
|
|
||||||
LLLoginRefreshHandler gLoginRefreshHandler;
|
LLLoginRefreshHandler gLoginRefreshHandler;
|
||||||
|
|
||||||
// <edit>
|
|
||||||
std::string gFullName;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
// helper class that trys to download a URL from a web site and calls a method
|
// 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
|
// on parent class indicating if the web server is working or not
|
||||||
class LLIamHereLogin : public LLHTTPClient::ResponderHeadersOnly
|
class LLIamHereLogin : public LLHTTPClient::ResponderHeadersOnly
|
||||||
|
|||||||
@@ -41,10 +41,6 @@
|
|||||||
class LLUIImage;
|
class LLUIImage;
|
||||||
class LLComboBox;
|
class LLComboBox;
|
||||||
|
|
||||||
// <edit>
|
|
||||||
extern std::string gFullName;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
class LLPanelLogin:
|
class LLPanelLogin:
|
||||||
public LLPanel,
|
public LLPanel,
|
||||||
public LLViewerMediaObserver
|
public LLViewerMediaObserver
|
||||||
@@ -165,8 +161,4 @@ private:
|
|||||||
std::string load_password_from_disk(void);
|
std::string load_password_from_disk(void);
|
||||||
void save_password_to_disk(const char* hashed_password);
|
void save_password_to_disk(const char* hashed_password);
|
||||||
|
|
||||||
// <edit>
|
|
||||||
extern std::string gFullName;
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -757,9 +757,6 @@ bool idle_startup()
|
|||||||
// We have at least some login information on a SLURL
|
// We have at least some login information on a SLURL
|
||||||
firstname = gLoginHandler.getFirstName();
|
firstname = gLoginHandler.getFirstName();
|
||||||
lastname = gLoginHandler.getLastName();
|
lastname = gLoginHandler.getLastName();
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
web_login_key = gLoginHandler.getWebLoginKey();
|
web_login_key = gLoginHandler.getWebLoginKey();
|
||||||
|
|
||||||
// Show the login screen if we don't have everything
|
// Show the login screen if we don't have everything
|
||||||
@@ -771,9 +768,6 @@ bool idle_startup()
|
|||||||
LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
|
LLSD cmd_line_login = gSavedSettings.getLLSD("UserLoginInfo");
|
||||||
firstname = cmd_line_login[0].asString();
|
firstname = cmd_line_login[0].asString();
|
||||||
lastname = cmd_line_login[1].asString();
|
lastname = cmd_line_login[1].asString();
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
|
LLMD5 pass((unsigned char*)cmd_line_login[2].asString().c_str());
|
||||||
char md5pass[33]; /* Flawfinder: ignore */
|
char md5pass[33]; /* Flawfinder: ignore */
|
||||||
@@ -791,9 +785,6 @@ bool idle_startup()
|
|||||||
{
|
{
|
||||||
firstname = gSavedSettings.getString("FirstName");
|
firstname = gSavedSettings.getString("FirstName");
|
||||||
lastname = gSavedSettings.getString("LastName");
|
lastname = gSavedSettings.getString("LastName");
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
password = LLStartUp::loadPasswordFromDisk();
|
password = LLStartUp::loadPasswordFromDisk();
|
||||||
gSavedSettings.setBOOL("RememberPassword", TRUE);
|
gSavedSettings.setBOOL("RememberPassword", TRUE);
|
||||||
|
|
||||||
@@ -809,9 +800,6 @@ bool idle_startup()
|
|||||||
// a valid grid is selected
|
// a valid grid is selected
|
||||||
firstname = gSavedSettings.getString("FirstName");
|
firstname = gSavedSettings.getString("FirstName");
|
||||||
lastname = gSavedSettings.getString("LastName");
|
lastname = gSavedSettings.getString("LastName");
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
password = LLStartUp::loadPasswordFromDisk();
|
password = LLStartUp::loadPasswordFromDisk();
|
||||||
show_connect_box = true;
|
show_connect_box = true;
|
||||||
}
|
}
|
||||||
@@ -895,9 +883,6 @@ bool idle_startup()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLPanelLogin::setFields(firstname, lastname, password);
|
LLPanelLogin::setFields(firstname, lastname, password);
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
LLPanelLogin::giveFocus();
|
LLPanelLogin::giveFocus();
|
||||||
}
|
}
|
||||||
display_startup();
|
display_startup();
|
||||||
@@ -969,9 +954,6 @@ bool idle_startup()
|
|||||||
{
|
{
|
||||||
firstname = gLoginHandler.getFirstName();
|
firstname = gLoginHandler.getFirstName();
|
||||||
lastname = gLoginHandler.getLastName();
|
lastname = gLoginHandler.getLastName();
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
web_login_key = gLoginHandler.getWebLoginKey();
|
web_login_key = gLoginHandler.getWebLoginKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -990,15 +972,21 @@ bool idle_startup()
|
|||||||
{
|
{
|
||||||
gSavedSettings.setString("FirstName", firstname);
|
gSavedSettings.setString("FirstName", firstname);
|
||||||
gSavedSettings.setString("LastName", lastname);
|
gSavedSettings.setString("LastName", lastname);
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
if (!gSavedSettings.controlExists("RememberLogin")) gSavedSettings.declareBOOL("RememberLogin", false, "Remember login", false);
|
if (!gSavedSettings.controlExists("RememberLogin")) gSavedSettings.declareBOOL("RememberLogin", false, "Remember login", false);
|
||||||
gSavedSettings.setBOOL("RememberLogin", LLPanelLogin::getRememberLogin());
|
gSavedSettings.setBOOL("RememberLogin", LLPanelLogin::getRememberLogin());
|
||||||
|
|
||||||
LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
|
LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
|
||||||
gDebugInfo["LoginName"] = firstname + " " + lastname;
|
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
|
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);
|
if(!text.empty()) lastname.assign(text);
|
||||||
gSavedSettings.setString("FirstName", firstname);
|
gSavedSettings.setString("FirstName", firstname);
|
||||||
gSavedSettings.setString("LastName", lastname);
|
gSavedSettings.setString("LastName", lastname);
|
||||||
// <edit>
|
|
||||||
gFullName = utf8str_tolower(firstname + " " + lastname);
|
|
||||||
// </edit>
|
|
||||||
|
|
||||||
if (gSavedSettings.getBOOL("RememberPassword"))
|
if (gSavedSettings.getBOOL("RememberPassword"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -264,6 +264,22 @@ An error occurred while updating [APP_NAME]. Please download the latest version
|
|||||||
yestext="Ok"/>
|
yestext="Ok"/>
|
||||||
</notification>
|
</notification>
|
||||||
|
|
||||||
|
<notification
|
||||||
|
icon="alertmodal.tga"
|
||||||
|
name="EmptyFirstNameMessage"
|
||||||
|
type="alertmodal">
|
||||||
|
[GRIDNAME] requires a non-empty first name to login.
|
||||||
|
Please try again.
|
||||||
|
</notification>
|
||||||
|
|
||||||
|
<notification
|
||||||
|
icon="alertmodal.tga"
|
||||||
|
name="EmptyLastNameMessage"
|
||||||
|
type="alertmodal">
|
||||||
|
[GRIDNAME] requires a non-empty last name to login.
|
||||||
|
Please try again.
|
||||||
|
</notification>
|
||||||
|
|
||||||
<notification
|
<notification
|
||||||
icon="alertmodal.tga"
|
icon="alertmodal.tga"
|
||||||
name="LoginFailedNoNetwork"
|
name="LoginFailedNoNetwork"
|
||||||
|
|||||||
Reference in New Issue
Block a user