From b01f7b6bf6ac26f040177f845477936aa0697b2d Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 4 Dec 2008 15:30:43 -0600 Subject: Use 127.0.0.1 for local opensim, not 0.0.0.0. --- linden/indra/newview/llviewernetwork.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index 5b423ff..c8cffcf 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp @@ -60,7 +60,7 @@ static LLGridData gGridInfo[GRID_INFO_COUNT] = { "Local OpenSim", "", "localhost", - "http://0.0.0.0:9000", + "http://127.0.0.1:9000", "" }, { "Other", "", "", "", "" } }; -- cgit v1.1 From 636460bd7a18c1b621b096ad55a80a5b49320775 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Dec 2008 11:47:18 -0600 Subject: VWR-10759 (use delete [] in LLMediaImplGStreamer) Patch by Aleric Inglewood. --- linden/indra/llmedia/llmediaimplgstreamer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp index 51a5bca..5d6a648 100644 --- a/linden/indra/llmedia/llmediaimplgstreamer.cpp +++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp @@ -428,7 +428,7 @@ unload () if (mediaData) { - delete mediaData; + delete [] mediaData; mediaData = NULL; } -- cgit v1.1 From 16ec76454eba3143e98434adab731cc71ad5ee0b Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Dec 2008 11:50:22 -0600 Subject: VWR-10837 (use delete [] in LLImageTGA) Patch by Aleric Inglewood. --- linden/indra/llimage/llimagetga.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/llimage/llimagetga.cpp b/linden/indra/llimage/llimagetga.cpp index 32c2111..21d0fd1 100644 --- a/linden/indra/llimage/llimagetga.cpp +++ b/linden/indra/llimage/llimagetga.cpp @@ -104,7 +104,7 @@ LLImageTGA::LLImageTGA(const std::string& file_name) LLImageTGA::~LLImageTGA() { - delete mColorMap; + delete [] mColorMap; } BOOL LLImageTGA::updateData() -- cgit v1.1 From 6718a49a75c861336d272082b1af46b5910f89ad Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Dec 2008 11:53:58 -0600 Subject: VWR-9400 (memleak whenever an LSL script is uploaded) Patch by Carjay McGinnis. --- linden/indra/llmessage/llhttpclient.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp index fc2612f..6242bda 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp @@ -160,10 +160,9 @@ namespace fstream.seekg(0, std::ios::end); U32 fileSize = fstream.tellg(); fstream.seekg(0, std::ios::beg); - char* fileBuffer; - fileBuffer = new char [fileSize]; - fstream.read(fileBuffer, fileSize); - ostream.write(fileBuffer, fileSize); + std::vector fileBuffer(fileSize); + fstream.read(&fileBuffer[0], fileSize); + ostream.write(&fileBuffer[0], fileSize); fstream.close(); eos = true; return STATUS_DONE; -- cgit v1.1 From 20c9dc0a1da2cd57716796ae97adcd4d018213da Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Dec 2008 12:00:05 -0600 Subject: VWR-9400-patch2 (memleak whenever an LSL script is uploaded) Patch by Henri Beauchamp. --- linden/indra/llmessage/llhttpclient.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'linden') diff --git a/linden/indra/llmessage/llhttpclient.cpp b/linden/indra/llmessage/llhttpclient.cpp index 6242bda..ef163fa 100644 --- a/linden/indra/llmessage/llhttpclient.cpp +++ b/linden/indra/llmessage/llhttpclient.cpp @@ -189,10 +189,9 @@ namespace LLVFile vfile(gVFS, mUUID, mAssetType, LLVFile::READ); S32 fileSize = vfile.getSize(); - U8* fileBuffer; - fileBuffer = new U8 [fileSize]; - vfile.read(fileBuffer, fileSize); - ostream.write((char*)fileBuffer, fileSize); + std::vector fileBuffer(fileSize); + vfile.read(&fileBuffer[0], fileSize); + ostream.write((char*)&fileBuffer[0], fileSize); eos = true; return STATUS_DONE; } -- cgit v1.1 From da7941be28dec850ad0757a8ff2fbfdf1b1b369b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Dec 2008 06:20:22 -0700 Subject: Changed Release Notes link to point to Imprudence --- linden/indra/llcommon/llsecondlifeurls.cpp | 2 +- linden/indra/newview/llfloaterabout.cpp | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'linden') diff --git a/linden/indra/llcommon/llsecondlifeurls.cpp b/linden/indra/llcommon/llsecondlifeurls.cpp index ee478fe..b006a6a 100644 --- a/linden/indra/llcommon/llsecondlifeurls.cpp +++ b/linden/indra/llcommon/llsecondlifeurls.cpp @@ -84,4 +84,4 @@ const std::string SL_KB_URL ( "http://secondlife.com/knowledgebase/"); const std::string RELEASE_NOTES_BASE_URL ( - "http://secondlife.com/app/releasenotes/"); + "http://imprudenceviewer.org/wiki/Release_Notes/"); diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 4704c5b..cb4d405 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -262,17 +262,12 @@ void LLFloaterAbout::show(void*) static std::string get_viewer_release_notes_url() { std::ostringstream version; - version << LL_VERSION_MAJOR << "." - << LL_VERSION_MINOR << "." - << LL_VERSION_PATCH << "." - << LL_VERSION_BUILD; - - LLSD query; - query["channel"] = gSavedSettings.getString("VersionChannelName"); - query["version"] = version.str(); + version << IMP_VERSION_MAJOR << "." + << IMP_VERSION_MINOR << "." + << IMP_VERSION_PATCH; std::ostringstream url; - url << RELEASE_NOTES_BASE_URL << LLURI::mapToQueryString(query); + url << RELEASE_NOTES_BASE_URL << version.str(); return url.str(); } -- cgit v1.1 From a86e98f9a85aad5be2962323386352900b0f0c69 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 8 Dec 2008 05:45:58 -0700 Subject: Added test version info to llversionviewer.h --- linden/indra/llcommon/llversionviewer.h | 1 + linden/indra/newview/llappviewer.cpp | 7 +++++-- linden/indra/newview/llfloaterabout.cpp | 11 ++++++++--- linden/indra/newview/llpanellogin.cpp | 5 +++-- 4 files changed, 17 insertions(+), 7 deletions(-) (limited to 'linden') diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index bc42359..cddc654 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -45,5 +45,6 @@ const char * const IMP_VIEWER_NAME = "Imprudence"; const S32 IMP_VERSION_MAJOR = 1; const S32 IMP_VERSION_MINOR = 0; const S32 IMP_VERSION_PATCH = 0; +const char * const IMP_VERSION_TEST = "RC2"; #endif diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 243a9d8..14214b5 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -602,11 +602,12 @@ bool LLAppViewer::init() writeSystemInfo(); // Build a string representing the current version number. - gCurrentVersion = llformat("%s %d.%d.%d / %s %d.%d.%d.%d", + gCurrentVersion = llformat("%s %d.%d.%d %s / %s %d.%d.%d.%d", gSavedSettings.getString("VersionChannelName").c_str(), IMP_VERSION_MAJOR, IMP_VERSION_MINOR, - IMP_VERSION_PATCH, + IMP_VERSION_PATCH, + IMP_VERSION_TEST, LL_VIEWER_NAME, LL_VERSION_MAJOR, LL_VERSION_MINOR, @@ -2247,6 +2248,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR; gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR; gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH; + gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST; gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; @@ -2330,6 +2332,7 @@ void LLAppViewer::handleViewerCrash() gDebugInfo["ClientInfo"]["ImpMajorVersion"] = IMP_VERSION_MAJOR; gDebugInfo["ClientInfo"]["ImpMinorVersion"] = IMP_VERSION_MINOR; gDebugInfo["ClientInfo"]["ImpPatchVersion"] = IMP_VERSION_PATCH; + gDebugInfo["ClientInfo"]["ImpTestVersion"] = IMP_VERSION_TEST; gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index cb4d405..59e3100 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -110,9 +110,9 @@ LLFloaterAbout::LLFloaterAbout() // Version string std::string version = llformat( - "%s %d.%d.%d / %s %d.%d.%d (%d), %s %s\n", + "%s %d.%d.%d %s / %s %d.%d.%d (%d), %s %s\n", IMP_VIEWER_NAME, - IMP_VERSION_MAJOR, IMP_VERSION_MINOR, IMP_VERSION_PATCH, + IMP_VERSION_MAJOR, IMP_VERSION_MINOR, IMP_VERSION_PATCH, IMP_VERSION_TEST, LL_VIEWER_NAME, LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__); @@ -266,8 +266,13 @@ static std::string get_viewer_release_notes_url() << IMP_VERSION_MINOR << "." << IMP_VERSION_PATCH; + std::ostringstream test_version; + + if(IMP_VERSION_TEST != "") + test_version << "#" << "Imprudence_" << version.str() << "_" << IMP_VERSION_TEST; + std::ostringstream url; - url << RELEASE_NOTES_BASE_URL << version.str(); + url << RELEASE_NOTES_BASE_URL << version.str() << test_version.str(); return url.str(); } diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 09e2cee..40a3a7f 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -360,10 +360,11 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, // childSetAction("quit_btn", onClickQuit, this); std::string imp_channel = gSavedSettings.getString("VersionChannelName"); - std::string imp_version = llformat("%d.%d.%d", + std::string imp_version = llformat("%d.%d.%d %s", IMP_VERSION_MAJOR, IMP_VERSION_MINOR, - IMP_VERSION_PATCH ); + IMP_VERSION_PATCH, + IMP_VERSION_TEST ); std::string ll_channel = LL_VIEWER_NAME; std::string ll_version = llformat("%d.%d.%d (%d)", -- cgit v1.1 From 6cf3cba7fd2cfe4e25522428e456360d414b89a5 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Dec 2008 05:21:06 -0700 Subject: Rebranded login menu. [#23] --- .../newview/skins/default/xui/en-us/menu_login.xml | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml index d7ff80b..8d06657 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml @@ -1,33 +1,33 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1 From 237b2c2d7e9c4844d4ca7c8f97b3a8b53eb9dec4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Dec 2008 05:00:17 -0700 Subject: Fixed blank url_history.xml creation. (VWR-5808) --- linden/indra/newview/llurlhistory.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llurlhistory.cpp b/linden/indra/newview/llurlhistory.cpp index ac3fa93..0dadbd0 100644 --- a/linden/indra/newview/llurlhistory.cpp +++ b/linden/indra/newview/llurlhistory.cpp @@ -72,9 +72,16 @@ bool LLURLHistory::loadFile(const std::string& filename) // static bool LLURLHistory::saveFile(const std::string& filename) -{ - std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter(); - llofstream out((temp_str + filename)); +{ + std::string temp_str = gDirUtilp->getLindenUserDir(); + if( temp_str.empty() ) + { + llwarns << "Can't save. No user directory set." << llendl; + return false; + } + + temp_str += gDirUtilp->getDirDelimiter() + filename; + llofstream out(temp_str); if (!out.good()) { llwarns << "Unable to open " << filename << " for output." << llendl; -- cgit v1.1 From 0febd03d39e36d2955c1869abeb2074fabc5c0fc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Wed, 10 Dec 2008 21:56:24 -0600 Subject: Fixed bad string comparison (grid code name). [#22] Reported by Balp Allen. --- linden/indra/newview/llviewernetwork.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index c8cffcf..2b5cc0c 100644 --- a/linden/indra/newview/llviewernetwork.cpp +++ b/linden/indra/newview/llviewernetwork.cpp @@ -163,7 +163,8 @@ std::string LLViewerLogin::getGridLabel() const std::string LLViewerLogin::getGridCodeName() const { - if( gGridInfo[mGridChoice].mCodeName == "" ) + // Fall back to grid label if code name is empty. + if( strcmp(gGridInfo[mGridChoice].mCodeName, "") == 0 ) { return getGridLabel(); } -- cgit v1.1 From a18b29075eabef8fb4caa02ba929407091ae4e35 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Wed, 10 Dec 2008 22:28:49 -0600 Subject: Better warning when url_history.xml save fails. --- linden/indra/newview/llurlhistory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llurlhistory.cpp b/linden/indra/newview/llurlhistory.cpp index 0dadbd0..c10add4 100644 --- a/linden/indra/newview/llurlhistory.cpp +++ b/linden/indra/newview/llurlhistory.cpp @@ -76,7 +76,8 @@ bool LLURLHistory::saveFile(const std::string& filename) std::string temp_str = gDirUtilp->getLindenUserDir(); if( temp_str.empty() ) { - llwarns << "Can't save. No user directory set." << llendl; + llwarns << "Can't save " << filename + << ": No user directory set." << llendl; return false; } -- cgit v1.1 From eb6c9309a9d0c76da6153b8290d33d50f56b9786 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Wed, 10 Dec 2008 23:35:38 -0600 Subject: Fix grid selector having a duplicate entry. [#24] Patch by Balp Allen. --- linden/indra/newview/llpanellogin.cpp | 8 ++++++++ linden/indra/newview/llpanellogin.h | 1 + linden/indra/newview/llstartup.cpp | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index 40a3a7f..a495516 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -712,6 +712,14 @@ void LLPanelLogin::addServer(const std::string& server, S32 domain_name) combo->setCurrentByIndex(0); } + +// static +void LLPanelLogin::setServer(S32 domain_name) +{ + LLComboBox* combo = sInstance->getChild("server_combo"); + combo->setCurrentByIndex(domain_name); +} + // static void LLPanelLogin::getFields(std::string &firstname, std::string &lastname, std::string &password, BOOL &remember) diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h index 539997b..78b0a22 100644 --- a/linden/indra/newview/llpanellogin.h +++ b/linden/indra/newview/llpanellogin.h @@ -87,6 +87,7 @@ public: const std::string& password, BOOL remember); static void addServer(const std::string& server, S32 domain_name); + static void setServer(S32 domain_name); static void refreshLocation( bool force_visible ); static void getFields(std::string& firstname, std::string& lastname, diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 625b1d8..6371f2b 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2458,14 +2458,14 @@ void login_show() // UI textures have been previously loaded in doPreloadImages() LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL; - - LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel(), LLViewerLogin::getInstance()->getGridChoice()); + LL_INFOS("AppInit") << "getGridChoice is " << LLViewerLogin::getInstance()->getGridChoice() << LL_ENDL; LLViewerLogin* vl = LLViewerLogin::getInstance(); for(int grid_index = GRID_INFO_NONE + 1; grid_index < GRID_INFO_OTHER; ++grid_index) { LLPanelLogin::addServer(vl->getKnownGridLabel((EGridInfo)grid_index), grid_index); } + LLPanelLogin::setServer(LLViewerLogin::getInstance()->getGridChoice()-1); } // Callback for when login screen is closed. Option 0 = connect, option 1 = quit. -- cgit v1.1 From a7a5691d03624f7c70b99203d9d6ee00d2ffaf91 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 11 Dec 2008 14:28:45 -0600 Subject: Fixed bad string comparison (rel notes url) [#28] Reported by Balp Allen. --- linden/indra/newview/llfloaterabout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 59e3100..f6e7792 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -268,7 +268,7 @@ static std::string get_viewer_release_notes_url() std::ostringstream test_version; - if(IMP_VERSION_TEST != "") + if( strcmp(IMP_VERSION_TEST, "") != 0 ) test_version << "#" << "Imprudence_" << version.str() << "_" << IMP_VERSION_TEST; std::ostringstream url; -- cgit v1.1 From e99716b74d442e2aeb88e2dbd480f2e99a6797b3 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 11 Dec 2008 14:32:04 -0600 Subject: Simplified release notes URL scheme. Now uses e.g. "wiki/Release Notes/1.0.0-RC2", which is set up as a wiki redirect. --- linden/indra/newview/llfloaterabout.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index f6e7792..af436c5 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -263,16 +263,15 @@ static std::string get_viewer_release_notes_url() { std::ostringstream version; version << IMP_VERSION_MAJOR << "." - << IMP_VERSION_MINOR << "." - << IMP_VERSION_PATCH; - - std::ostringstream test_version; + << IMP_VERSION_MINOR << "." + << IMP_VERSION_PATCH; + // Append the test version if it's not empty if( strcmp(IMP_VERSION_TEST, "") != 0 ) - test_version << "#" << "Imprudence_" << version.str() << "_" << IMP_VERSION_TEST; + version << "-" << IMP_VERSION_TEST; std::ostringstream url; - url << RELEASE_NOTES_BASE_URL << version.str() << test_version.str(); + url << RELEASE_NOTES_BASE_URL << version.str(); return url.str(); } -- cgit v1.1 From 8186bd3db550d2a5cafd840679e8b13ff10a82b5 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 11 Dec 2008 16:29:43 -0600 Subject: Indentation cleanup. (llviewernetwork.cpp) --- linden/indra/newview/llviewernetwork.cpp | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp index 2b5cc0c..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) // The string can be: // - a grid label from the gGridInfo table // - an ip address - if(!grid_name.empty()) - { - // find the grid choice from the user setting. - int grid_index = GRID_INFO_NONE; - for(;grid_index < GRID_INFO_OTHER; ++grid_index) - { - if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) - { + if(!grid_name.empty()) + { + // find the grid choice from the user setting. + int grid_index = GRID_INFO_NONE; + for(;grid_index < GRID_INFO_OTHER; ++grid_index) + { + if(0 == LLStringUtil::compareInsensitive(gGridInfo[grid_index].mLabel, grid_name)) + { // Founding a matching label in the list... setGridChoice((EGridInfo)grid_index); break; - } - } + } + } - if(GRID_INFO_OTHER == grid_index) - { - // *FIX:MEP Can and should we validate that this is an IP address? - mGridChoice = GRID_INFO_OTHER; - mGridName = grid_name; + if(GRID_INFO_OTHER == grid_index) + { + // *FIX:MEP Can and should we validate that this is an IP address? + mGridChoice = GRID_INFO_OTHER; + mGridName = grid_name; gSavedSettings.setS32("ServerChoice", mGridChoice); gSavedSettings.setString("CustomServer", mGridName); - } - } + } + } } void LLViewerLogin::resetURIs() { - // Clear URIs when picking a new server + // Clear URIs when picking a new server gSavedSettings.setValue("CmdLineLoginURI", LLSD::emptyArray()); gSavedSettings.setString("CmdLineHelperURI", ""); } -- cgit v1.1