summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorLogan Dethrow <log@lindenlab.com>2011-08-02 11:08:07 -0400
committerLogan Dethrow <log@lindenlab.com>2011-08-02 11:08:07 -0400
commit97bedac2a1274f26a6a346afccea7596f1d13923 (patch)
tree9c1a3dc2480fc0eba9ed8d15e6910c5bd8dc7f1e /indra/newview/llstartup.cpp
parentd2c72cb7e92896cb414e357ef262d91b0498a6b7 (diff)
Proxy: Improved mutex usage in LLProxy. Introduced an LLAtomic member to track the status of the http proxy that can be checked without locking a mutex.
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index c934ff9f1b..3ec5842e3c 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2785,6 +2785,7 @@ bool LLStartUp::handleSocksProxy()
subs["HOST"] = http_host.getIPString();
subs["PORT"] = (S32)http_host.getPort();
LLNotificationsUtil::add("PROXY_INVALID_HTTP_HOST", subs);
+ return false;
}
}
else if ((httpProxyType.compare("Socks") == 0) && gSavedSettings.getBOOL("Socks5ProxyEnabled"))
@@ -2798,9 +2799,8 @@ bool LLStartUp::handleSocksProxy()
subs["HOST"] = socks_host.getIPString();
subs["PORT"] = (S32)socks_host.getPort();
LLNotificationsUtil::add("PROXY_INVALID_SOCKS_HOST", subs);
+ return false;
}
-
-
}
else if (httpProxyType.compare("None") == 0)
{
@@ -2816,7 +2816,6 @@ bool LLStartUp::handleSocksProxy()
// Set up SOCKS proxy (if needed)
if (gSavedSettings.getBOOL("Socks5ProxyEnabled"))
{
-
// Determine and update LLProxy with the saved authentication system
std::string auth_type = gSavedSettings.getString("Socks5AuthType");
@@ -2826,13 +2825,13 @@ bool LLStartUp::handleSocksProxy()
std::string socks_user = socks_cred->getIdentifier()["username"].asString();
std::string socks_password = socks_cred->getAuthenticator()["creds"].asString();
- bool ok;
- ok = LLProxy::getInstance()->setAuthPassword(socks_user, socks_password);
+ bool ok = LLProxy::getInstance()->setAuthPassword(socks_user, socks_password);
+
if (!ok)
{
LLNotificationsUtil::add("SOCKS_BAD_CREDS");
+ return false;
}
-
}
else if (auth_type.compare("None") == 0)
{