From 21d092705cff87dedc0c250c7dbc05ed759dfb40 Mon Sep 17 00:00:00 2001 From: Beeks Date: Sun, 10 Oct 2010 21:55:19 -0400 Subject: [PATCH 1/7] fixfixfixfixfixfixfixfixfixfixfixfixfixfixfixfixfixfixfixfix Signed-off-by: Beeks --- indra/newview/llappviewerlinux.cpp | 95 +++++------------------------- 1 file changed, 16 insertions(+), 79 deletions(-) diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp index 9e76c2eae..20fd668d7 100644 --- a/indra/newview/llappviewerlinux.cpp +++ b/indra/newview/llappviewerlinux.cpp @@ -732,89 +732,26 @@ std::string LLAppViewerLinux::generateSerialNumber() { char serial_md5[MD5HEX_STR_SIZE]; serial_md5[0] = 0; -#if LL_SOLARIS - // TODO -#else - std::string rootDeviceName = ""; - std::string rootDeviceUUID = ""; - std::ifstream mountsFile ("/proc/mounts", std::ios_base::in); - std::string line; - while (getline(mountsFile, line, '\n')) + std::string best; + std::string uuiddir("/dev/disk/by-uuid/"); + + // trawl /dev/disk/by-uuid looking for a good-looking UUID to grab + std::string this_name; + BOOL wrap = FALSE; + while (gDirUtilp->getNextFileInDir(uuiddir, "*", this_name, wrap)) { - std::vector splitline; - boost::split(splitline, line, boost::is_any_of(" ")); - if(splitline[0] != "rootfs" && splitline[1] == "/") + if (this_name.length() > best.length() || + (this_name.length() == best.length() && + this_name > best)) { - //bingo! - rootDeviceName = splitline[0]; - splitline.clear(); - break; - } - else - { - splitline.clear(); + // longest (and secondarily alphabetically last) so far + best = this_name; } } - mountsFile.close(); - DIR *dp; - struct dirent *ep; - - char targetDir[] = "/dev/disk/by-uuid/"; - dp = opendir (targetDir); - if (dp != NULL) - { - while ((ep = readdir (dp))) - { - if(strcmp(".", ep->d_name) != 0 && strcmp("..", ep->d_name) != 0) - { - char buf[512]; - char* targetLink = new char[1024]; - strcpy(targetLink, targetDir); - - strcat(targetLink, ep->d_name); - int count = readlink(targetLink, buf, sizeof(buf)); - if (count >= 0) - { - buf[count] = '\0'; - std::vector splitSymlink; - boost::split(splitSymlink, buf, boost::is_any_of("/")); - //alright, this is the root partition, print out its uuid - if("/dev/" + splitSymlink[splitSymlink.size() - 1] == rootDeviceName) - { - rootDeviceUUID = ep->d_name; - splitSymlink.clear(); - break; - } - else - { - splitSymlink.clear(); - } - } - } - } - - (void) closedir (dp); - } - else - { - llwarns << "Couldn't open /dev/disk/by-uuid/" << llendl; - } - - if(rootDeviceName != "" && rootDeviceUUID != "") - { - LLMD5 md5; - md5.update( (unsigned char*)rootDeviceUUID.c_str(), sizeof(char[36])); - md5.finalize(); - md5.hex_digest(serial_md5); - - llinfos << "Root Device: " << rootDeviceName << "\tUUID: " << rootDeviceUUID << "\tHash: " << serial_md5 << llendl; - } - else - { - llwarns << "Could not find root device's UUID" << llendl; - } -#endif + // we don't return the actual serial number, just a hash of it. + LLMD5 md5( reinterpret_cast(best.c_str()) ); + md5.hex_digest(serial_md5); return serial_md5; -} +} \ No newline at end of file From 18594be313fd2b70d7513521e6cdb9228ebe006f Mon Sep 17 00:00:00 2001 From: Beeks Date: Tue, 12 Oct 2010 14:11:09 -0400 Subject: [PATCH 2/7] TPV Compliance fixes - One I thought was handled and one I thought wasn't an issue. Signed-off-by: Beeks --- indra/newview/llfloatertos.cpp | 5 +---- indra/newview/llpanelface.cpp | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 6bb19cdbb..2dedc79af 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -155,10 +155,7 @@ BOOL LLFloaterTOS::postBuild() // disable Agree to TOS radio button until the page has fully loaded LLCheckBoxCtrl* tos_agreement = getChild("agree_chk"); - // - // UHHHH NO :> - tos_agreement->setEnabled( true ); - // + tos_agreement->setEnabled( false ); // hide the SL text widget if we're displaying TOS with using a browser widget. LLTextEditor *editor = getChild("tos_text"); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 00c5a0940..a3d790f26 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -51,6 +51,7 @@ #include "llcombobox.h" #include "lldrawpoolbump.h" #include "llface.h" +#include "llinventorymodel.h" //Perms check for texture params #include "lllineeditor.h" #include "llresmgr.h" #include "llselectmgr.h" @@ -1183,8 +1184,22 @@ void LLPanelFace::onClickCopy(void* userdata) textures.clear(); for (S32 i = 0; i < te_count; i++) { + LLSD tex_params = objectp->getTE(i)->asLLSD(); + LLInventoryItem* itemp = gInventory.getItem(objectp->getTE(i)->getID()); + LLUUID tex = tex_params["imageid"]; + tex_params["imageid"] = LLUUID::null; + gSavedPerAccountSettings.setLLSD("Image.Settings", tex_params); + if (itemp) + { + LLPermissions perms = itemp->getPermissions(); + //full perms + if (perms.getMaskOwner() & PERM_ITEM_UNRESTRICTED) + { + tex_params["imageid"] = tex; + } + } llinfos << "Copying params on face " << i << "." << llendl; - textures.append(objectp->getTE(i)->asLLSD()); + textures.append(tex_params); } } @@ -1215,6 +1230,9 @@ void LLPanelFace::onClickPaste(void* userdata) for (int i = 0; i < textures.size(); i++) { llinfos << "Pasting params on face " << i << "." << llendl; + LLSD cur_tex = objectp->getTE(i)->asLLSD(); + if (textures[i]["imageid"].asUUID() == LLUUID::null) + textures[i]["imageid"] = cur_tex["imageid"]; LLTextureEntry tex; tex.fromLLSD(textures[i]); obj.setTE(U8(i), tex); From 8f5227f52c968563bc392aea2933f95646b115e9 Mon Sep 17 00:00:00 2001 From: November Date: Wed, 13 Oct 2010 15:04:44 -0700 Subject: [PATCH 3/7] Committing version. --- indra/llcommon/llversionviewer.h | 2 +- indra/newview/English.lproj/InfoPlist.strings | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index c43395731..818d65283 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -36,7 +36,7 @@ const S32 LL_VERSION_MAJOR = 1; const S32 LL_VERSION_MINOR = 4; const S32 LL_VERSION_PATCH = 2; -const S32 LL_VERSION_BUILD = 8; +const S32 LL_VERSION_BUILD = 9; const char * const LL_CHANNEL = "Ascent Viewer Release"; diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index b2c2b72e6..a1040d232 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -2,6 +2,6 @@ CFBundleName = "Ascent"; -CFBundleShortVersionString = "Ascent version 1.4.2.7"; -CFBundleGetInfoString = "Snowglobe version 1.4.2.7, Balseraph Software Group"; +CFBundleShortVersionString = "Ascent version 1.4.2.9"; +CFBundleGetInfoString = "Snowglobe version 1.4.2.9, Balseraph Software Group"; From 5a80be37fd172299c64c1ae2a902419190ad758e Mon Sep 17 00:00:00 2001 From: November Date: Thu, 14 Oct 2010 16:18:19 -0700 Subject: [PATCH 4/7] Should fix issues rezzing oblong sculpties. --- indra/newview/llface.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3d93dd4d2..392ad9fa8 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1269,10 +1269,18 @@ F32 LLFace::getTextureVirtualSize() } F32 face_area; - if (mVObjp->isSculpted() && texel_area > 1.f) + if (mVObjp->isSculpted()) { //sculpts can break assumptions about texel area - face_area = mPixelArea; + if (texel_area > 1.f) + { + face_area = mPixelArea; + } + else + { + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); + } + } else { From 24cb0445c5631505c0eb7efdbec62c2dff02f4ba Mon Sep 17 00:00:00 2001 From: November Date: Thu, 14 Oct 2010 16:25:14 -0700 Subject: [PATCH 5/7] Revert "Should fix issues rezzing oblong sculpties." This reverts commit 5a80be37fd172299c64c1ae2a902419190ad758e. --- indra/newview/llface.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 392ad9fa8..3d93dd4d2 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1269,18 +1269,10 @@ F32 LLFace::getTextureVirtualSize() } F32 face_area; - if (mVObjp->isSculpted()) + if (mVObjp->isSculpted() && texel_area > 1.f) { //sculpts can break assumptions about texel area - if (texel_area > 1.f) - { - face_area = mPixelArea; - } - else - { - face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); - } - + face_area = mPixelArea; } else { From de947507b1b3d68095f26784c53c25b29bd41be7 Mon Sep 17 00:00:00 2001 From: November Date: Thu, 14 Oct 2010 16:27:22 -0700 Subject: [PATCH 6/7] Pulling Snowglobe 1.5's fix for loading oblong sculpts. --- indra/newview/llface.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3d93dd4d2..85b776083 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1278,9 +1278,7 @@ F32 LLFace::getTextureVirtualSize() { //apply texel area to face area to get accurate ratio //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); - - //face_area = mPixelArea / llclamp(texel_area, 0.015625f, 1024.f); - face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); // see SNOW-207 + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 1024.f); } if(face_area > LLViewerImage::sMaxSmallImageSize) From 58eff984dac471c8356f169aae181557dc408860 Mon Sep 17 00:00:00 2001 From: November Date: Thu, 14 Oct 2010 16:43:32 -0700 Subject: [PATCH 7/7] Yeah screw this, everything set here was absolutely correct to begin with and I shouldn't be applying patches while half awake when requested. This reverts commit de947507b1b3d68095f26784c53c25b29bd41be7. --- indra/newview/llface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 85b776083..3d93dd4d2 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1278,7 +1278,9 @@ F32 LLFace::getTextureVirtualSize() { //apply texel area to face area to get accurate ratio //face_area /= llclamp(texel_area, 1.f/64.f, 16.f); - face_area = mPixelArea / llclamp(texel_area, 0.015625f, 1024.f); + + //face_area = mPixelArea / llclamp(texel_area, 0.015625f, 1024.f); + face_area = mPixelArea / llclamp(texel_area, 0.015625f, 128.f); // see SNOW-207 } if(face_area > LLViewerImage::sMaxSmallImageSize)