diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/llpanellogin.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llviewernetwork.cpp | 21 | ||||
-rw-r--r-- | linden/indra/newview/llviewernetwork.h | 14 |
3 files changed, 31 insertions, 6 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 86dab63..1dff8e7 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -877,7 +877,7 @@ void LLPanelLogin::loadLoginPage() | |||
877 | curl_free(curl_version); | 877 | curl_free(curl_version); |
878 | 878 | ||
879 | // Grid | 879 | // Grid |
880 | char* curl_grid = curl_escape(LLViewerLogin::getInstance()->getGridLabel().c_str(), 0); | 880 | char* curl_grid = curl_escape(LLViewerLogin::getInstance()->getGridCodeName().c_str(), 0); |
881 | oStr << "&grid=" << curl_grid; | 881 | oStr << "&grid=" << curl_grid; |
882 | curl_free(curl_grid); | 882 | curl_free(curl_grid); |
883 | 883 | ||
diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index 7d1d351..7fb19af 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp | |||
@@ -38,6 +38,7 @@ | |||
38 | struct LLGridData | 38 | struct LLGridData |
39 | { | 39 | { |
40 | const char* mLabel; | 40 | const char* mLabel; |
41 | const char* mCodeName; | ||
41 | const char* mName; | 42 | const char* mName; |
42 | const char* mLoginURI; | 43 | const char* mLoginURI; |
43 | const char* mHelperURI; | 44 | const char* mHelperURI; |
@@ -45,23 +46,23 @@ struct LLGridData | |||
45 | 46 | ||
46 | static LLGridData gGridInfo[GRID_INFO_COUNT] = | 47 | static LLGridData gGridInfo[GRID_INFO_COUNT] = |
47 | { | 48 | { |
48 | { "None", "", "", ""}, | 49 | { "None", "", "", "", "" }, |
49 | { "SL Beta Grid", | 50 | { "SL Beta Grid", |
51 | "Aditi", | ||
50 | "util.aditi.lindenlab.com", | 52 | "util.aditi.lindenlab.com", |
51 | "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", | 53 | "https://login.aditi.lindenlab.com/cgi-bin/login.cgi", |
52 | "http://aditi-secondlife.webdev.lindenlab.com/helpers/" }, | 54 | "http://aditi-secondlife.webdev.lindenlab.com/helpers/" }, |
53 | { "SL Main Grid", | 55 | { "SL Main Grid", |
56 | "Agni", | ||
54 | "util.agni.lindenlab.com", | 57 | "util.agni.lindenlab.com", |
55 | "https://login.agni.lindenlab.com/cgi-bin/login.cgi", | 58 | "https://login.agni.lindenlab.com/cgi-bin/login.cgi", |
56 | "https://secondlife.com/helpers/" }, | 59 | "https://secondlife.com/helpers/" }, |
57 | { "Local OpenSim", | 60 | { "Local OpenSim", |
61 | "", | ||
58 | "localhost", | 62 | "localhost", |
59 | "http://0.0.0.0:9000", | 63 | "http://0.0.0.0:9000", |
60 | "" }, | 64 | "" }, |
61 | { "Other", | 65 | { "Other", "", "", "", "" } |
62 | "", | ||
63 | "", | ||
64 | "" } | ||
65 | }; | 66 | }; |
66 | 67 | ||
67 | const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; | 68 | const EGridInfo DEFAULT_GRID_CHOICE = GRID_INFO_AGNI; |
@@ -160,6 +161,16 @@ std::string LLViewerLogin::getGridLabel() const | |||
160 | return mGridName; | 161 | return mGridName; |
161 | } | 162 | } |
162 | 163 | ||
164 | std::string LLViewerLogin::getGridCodeName() const | ||
165 | { | ||
166 | if( gGridInfo[mGridChoice].mCodeName == "" ) | ||
167 | { | ||
168 | return getGridLabel(); | ||
169 | } | ||
170 | |||
171 | return gGridInfo[mGridChoice].mCodeName; | ||
172 | } | ||
173 | |||
163 | std::string LLViewerLogin::getKnownGridLabel(EGridInfo grid_index) const | 174 | std::string LLViewerLogin::getKnownGridLabel(EGridInfo grid_index) const |
164 | { | 175 | { |
165 | if(grid_index > GRID_INFO_NONE && grid_index < GRID_INFO_OTHER) | 176 | if(grid_index > GRID_INFO_NONE && grid_index < GRID_INFO_OTHER) |
diff --git a/linden/indra/newview/llviewernetwork.h b/linden/indra/newview/llviewernetwork.h index e39507d..39ac879 100644 --- a/linden/indra/newview/llviewernetwork.h +++ b/linden/indra/newview/llviewernetwork.h | |||
@@ -72,6 +72,20 @@ public: | |||
72 | **/ | 72 | **/ |
73 | std::string getGridLabel() const; | 73 | std::string getGridLabel() const; |
74 | 74 | ||
75 | /** | ||
76 | * @brief Get the code name for the grid choice. | ||
77 | * | ||
78 | * Returns the code name for the grid choice, as designated | ||
79 | * by Linden Lab. The SL main grid is Agni, and the beta | ||
80 | * grid is Aditi. There are other LL testing grids with code | ||
81 | * names, but we don't care about those. | ||
82 | * | ||
83 | * This string is used primarily for fetching the proper | ||
84 | * login splash page, since the web server expects "Agni" | ||
85 | * and "Aditi", not "SL Main Grid" and "SL Beta Grid". | ||
86 | */ | ||
87 | std::string getGridCodeName() const; | ||
88 | |||
75 | std::string getKnownGridLabel(EGridInfo grid_index) const; | 89 | std::string getKnownGridLabel(EGridInfo grid_index) const; |
76 | 90 | ||
77 | void getLoginURIs(std::vector<std::string>& uris) const; | 91 | void getLoginURIs(std::vector<std::string>& uris) const; |