diff options
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r-- | indra/newview/lllogininstance.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index bb55a3a6c0..8d361d3161 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -57,10 +57,13 @@ #include "llmachineid.h" #include "llevents.h" #include "llappviewer.h" +#include "llsdserialize.h" #include <boost/scoped_ptr.hpp> #include <sstream> +const S32 LOGIN_MAX_RETRIES = 3; + class LLLoginInstance::Disposable { public: virtual ~Disposable() {} @@ -207,8 +210,8 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia request_params["version"] = LLVersionInfo::getVersion(); request_params["channel"] = LLVersionInfo::getChannel(); request_params["platform"] = mPlatform; - request_params["platform_version"] = mPlatformVersion; request_params["address_size"] = ADDRESS_SIZE; + request_params["platform_version"] = mPlatformVersion; request_params["platform_string"] = mPlatformVersionName; request_params["id0"] = mSerialNumber; request_params["host_id"] = gSavedSettings.getString("HostID"); @@ -227,13 +230,16 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia request_params[it->first] = it->second; } + // Specify desired timeout/retry options + LLSD http_params; + http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout"); + http_params["retries"] = LOGIN_MAX_RETRIES; + mRequestData.clear(); mRequestData["method"] = "login_to_simulator"; mRequestData["params"] = request_params; mRequestData["options"] = requested_options; - - mRequestData["cfg_srv_timeout"] = gSavedSettings.getF32("LoginSRVTimeout"); - mRequestData["cfg_srv_pump"] = gSavedSettings.getString("LoginSRVPump"); + mRequestData["http_params"] = http_params; } bool LLLoginInstance::handleLoginEvent(const LLSD& event) @@ -330,10 +336,12 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event) data["VERSION"] = required_version; LLNotificationsUtil::add("RequiredUpdate", data, LLSD::emptyMap(), boost::bind(&LLLoginInstance::handleLoginDisallowed, this, _1, _2)); } - else if(reason_response == "key") + else if( reason_response == "key" + || reason_response == "presence" + || reason_response == "connect" + ) { - // this is a password problem or other restriction - // an appropriate message has already been displayed + // these are events that have already been communicated elsewhere attemptComplete(); } else |