aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llstartup.cpp43
1 files changed, 35 insertions, 8 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 4af02cb..0130edf 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -117,6 +117,7 @@
117#include "llpreviewscript.h" 117#include "llpreviewscript.h"
118#include "llselectmgr.h" 118#include "llselectmgr.h"
119#include "llsky.h" 119#include "llsky.h"
120#include "llsrv.h"
120#include "llstatview.h" 121#include "llstatview.h"
121#include "llsurface.h" 122#include "llsurface.h"
122#include "lltexturecache.h" 123#include "lltexturecache.h"
@@ -285,7 +286,8 @@ BOOL idle_startup()
285 // auth/transform loop will do. 286 // auth/transform loop will do.
286 static F32 progress = 0.10f; 287 static F32 progress = 0.10f;
287 288
288 static std::string auth_uri; 289 static std::vector<std::string> auth_uris;
290 static int auth_uri_num = -1;
289 static std::string auth_method; 291 static std::string auth_method;
290 static std::string auth_desc; 292 static std::string auth_desc;
291 static std::string auth_message; 293 static std::string auth_message;
@@ -1109,7 +1111,11 @@ BOOL idle_startup()
1109 gSavedSettings.setBOOL("UseDebugMenus", TRUE); 1111 gSavedSettings.setBOOL("UseDebugMenus", TRUE);
1110 requested_options.push_back("god-connect"); 1112 requested_options.push_back("god-connect");
1111 } 1113 }
1112 auth_uri = getLoginURI(); 1114 if (auth_uris.empty())
1115 {
1116 auth_uris = getLoginURIs();
1117 }
1118 auth_uri_num = 0;
1113 auth_method = "login_to_simulator"; 1119 auth_method = "login_to_simulator";
1114 auth_desc = "Logging in. "; 1120 auth_desc = "Logging in. ";
1115 auth_desc += gSecondLife; 1121 auth_desc += gSecondLife;
@@ -1152,7 +1158,7 @@ BOOL idle_startup()
1152 hashed_mac.hex_digest(hashed_mac_string); 1158 hashed_mac.hex_digest(hashed_mac_string);
1153 1159
1154 gUserAuthp->authenticate( 1160 gUserAuthp->authenticate(
1155 auth_uri.c_str(), 1161 auth_uris[auth_uri_num].c_str(),
1156 auth_method.c_str(), 1162 auth_method.c_str(),
1157 firstname.c_str(), 1163 firstname.c_str(),
1158 lastname.c_str(), 1164 lastname.c_str(),
@@ -1248,7 +1254,8 @@ BOOL idle_startup()
1248 else if(login_response && (0 == strcmp(login_response, "indeterminate"))) 1254 else if(login_response && (0 == strcmp(login_response, "indeterminate")))
1249 { 1255 {
1250 llinfos << "Indeterminate login..." << llendl; 1256 llinfos << "Indeterminate login..." << llendl;
1251 auth_uri = gUserAuthp->getResponse("next_url"); 1257 auth_uris = LLSRV::rewriteURI(gUserAuthp->getResponse("next_url"));
1258 auth_uri_num = 0;
1252 auth_method = gUserAuthp->getResponse("next_method"); 1259 auth_method = gUserAuthp->getResponse("next_method");
1253 auth_message = gUserAuthp->getResponse("message"); 1260 auth_message = gUserAuthp->getResponse("message");
1254 if(auth_method.substr(0, 5) == "login") 1261 if(auth_method.substr(0, 5) == "login")
@@ -1351,13 +1358,33 @@ BOOL idle_startup()
1351 case LLUserAuth::E_SSL_PEER_CERTIFICATE: 1358 case LLUserAuth::E_SSL_PEER_CERTIFICATE:
1352 case LLUserAuth::E_UNHANDLED_ERROR: 1359 case LLUserAuth::E_UNHANDLED_ERROR:
1353 default: 1360 default:
1354 emsg << "Unable to connect to " << gSecondLife << ".\n"; 1361 if (auth_uri_num >= (int) auth_uris.size())
1355 emsg << gUserAuthp->errorMessage(); 1362 {
1363 emsg << "Unable to connect to " << gSecondLife << ".\n";
1364 emsg << gUserAuthp->errorMessage();
1365 } else {
1366 std::ostringstream s;
1367 s << "Logging in (attempt " << (auth_uri_num + 1) << "). ";
1368 auth_desc = s.str();
1369 gStartupState = STATE_LOGIN_AUTHENTICATE;
1370 auth_uri_num++;
1371 return do_normal_idle;
1372 }
1356 break; 1373 break;
1357 case LLUserAuth::E_SSL_CACERT: 1374 case LLUserAuth::E_SSL_CACERT:
1358 case LLUserAuth::E_SSL_CONNECT_ERROR: 1375 case LLUserAuth::E_SSL_CONNECT_ERROR:
1359 emsg << "Unable to establish a secure connection to the login server.\n"; 1376 if (auth_uri_num >= (int) auth_uris.size())
1360 emsg << gUserAuthp->errorMessage(); 1377 {
1378 emsg << "Unable to establish a secure connection to the login server.\n";
1379 emsg << gUserAuthp->errorMessage();
1380 } else {
1381 std::ostringstream s;
1382 s << "Logging in (attempt " << (auth_uri_num + 1) << "). ";
1383 auth_desc = s.str();
1384 gStartupState = STATE_LOGIN_AUTHENTICATE;
1385 auth_uri_num++;
1386 return do_normal_idle;
1387 }
1361 break; 1388 break;
1362 } 1389 }
1363 1390