diff options
Diffstat (limited to 'linden/indra/newview/llviewernetwork.cpp')
-rw-r--r-- | linden/indra/newview/llviewernetwork.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index c8cffcf..9019b88 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp | |||
@@ -110,34 +110,34 @@ void LLViewerLogin::setGridChoice(const std::string& grid_name) | |||
110 | // The string can be: | 110 | // The string can be: |
111 | // - a grid label from the gGridInfo table | 111 | // - a grid label from the gGridInfo table |
112 | // - an ip address | 112 | // - an ip address |
113 | if(!grid_name.empty()) | 113 | if(!grid_name.empty()) |
114 | { | 114 | { |
115 | // find the grid choice from the user setting. | 115 | // find the grid choice from the user setting. |
116 | int grid_index = GRID_INFO_NONE; | 116 | int grid_index = GRID_INFO_NONE; |
117 | for(;grid_index < GRID_INFO_OTHER; ++grid_index) | 117 | for(;grid_index < GRID_INFO_OTHER; ++grid_index) |
118 | { | 118 | { |
119 | if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) | 119 | if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) |
120 | { | 120 | { |
121 | // Founding a matching label in the list... | 121 | // Founding a matching label in the list... |
122 | setGridChoice((EGridInfo)grid_index); | 122 | setGridChoice((EGridInfo)grid_index); |
123 | break; | 123 | break; |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | if(GRID_INFO_OTHER == grid_index) | 127 | if(GRID_INFO_OTHER == grid_index) |
128 | { | 128 | { |
129 | // *FIX:MEP Can and should we validate that this is an IP address? | 129 | // *FIX:MEP Can and should we validate that this is an IP address? |
130 | mGridChoice = GRID_INFO_OTHER; | 130 | mGridChoice = GRID_INFO_OTHER; |
131 | mGridName = grid_name; | 131 | mGridName = grid_name; |
132 | gSavedSettings.setS32("ServerChoice", mGridChoice); | 132 | gSavedSettings.setS32("ServerChoice", mGridChoice); |
133 | gSavedSettings.setString("CustomServer", mGridName); | 133 | gSavedSettings.setString("CustomServer", mGridName); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | void LLViewerLogin::resetURIs() | 138 | void LLViewerLogin::resetURIs() |
139 | { | 139 | { |
140 | // Clear URIs when picking a new server | 140 | // Clear URIs when picking a new server |
141 | gSavedSettings.setValue("CmdLineLoginURI", LLSD::emptyArray()); | 141 | gSavedSettings.setValue("CmdLineLoginURI", LLSD::emptyArray()); |
142 | gSavedSettings.setString("CmdLineHelperURI", ""); | 142 | gSavedSettings.setString("CmdLineHelperURI", ""); |
143 | } | 143 | } |
@@ -163,7 +163,8 @@ std::string LLViewerLogin::getGridLabel() const | |||
163 | 163 | ||
164 | std::string LLViewerLogin::getGridCodeName() const | 164 | std::string LLViewerLogin::getGridCodeName() const |
165 | { | 165 | { |
166 | if( gGridInfo[mGridChoice].mCodeName == "" ) | 166 | // Fall back to grid label if code name is empty. |
167 | if( strcmp(gGridInfo[mGridChoice].mCodeName, "") == 0 ) | ||
167 | { | 168 | { |
168 | return getGridLabel(); | 169 | return getGridLabel(); |
169 | } | 170 | } |