From 9572c5ed1b14096ffc31963512a7a6567578ff30 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Mon, 12 Apr 2010 16:55:32 +0100 Subject: EXT-6808 Update Vivox SDK to 3.1.0001.8385 --- install.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.xml b/install.xml index c1894ddc38..f5e26107d3 100644 --- a/install.xml +++ b/install.xml @@ -1386,23 +1386,23 @@ anguage Infrstructure (CLI) international standard darwin md5sum - 38d836fa53d073b9f197eecd0f5615f0 + 3b7fa3a7ac07034a747759f22956b6d5 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-darwin-20100319.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-darwin-20100412.tar.bz2 linux md5sum - dd8dd1c223ecb8b232bf626cca6c63ac + 3f834e00fa06e636814f22ad8685e407 url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-linux-20100319.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-linux-20100412.tar.bz2 windows md5sum - 8b4ce60f25823cd38896cb3b7eb0dd43 + 089a715a33cb48e030c9206966dfe31b url - http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-windows-20100319.tar.bz2 + http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-windows-20100412.tar.bz2 -- cgit v1.2.3 From 244418e6b2f4647d09995492f52180a0d3824cd2 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Wed, 7 Apr 2010 13:38:21 +0300 Subject: Fixed critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object) - moved restoring the flying of the agent before calling the mAutoPilotFinishedCallback, to allow finished callback to change it. - fixed LLVOAvatar::sitOnObject() to set mIsSitting = TRUE before stoping the autopilot, like it was in 1.23 version. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/185/ --- indra/newview/llagent.cpp | 10 +++++----- indra/newview/llvoavatar.cpp | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c5d7f6f118..d9d95f1cd6 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,6 +2296,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -2303,11 +2308,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f5e83ed025..16eb877b1d 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5619,6 +5619,8 @@ void LLVOAvatar::sitDown(BOOL bSitting) //----------------------------------------------------------------------------- void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) { + sitDown(TRUE); + if (isSelf()) { // Might be first sit @@ -5651,7 +5653,6 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); gPipeline.markMoved(mDrawable, TRUE); - sitDown(TRUE); mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject mRoot.setPosition(getPosition()); mRoot.updateWorldMatrixChildren(); -- cgit v1.2.3 From a89a15a9e9f409828146db90984ad728dbaf028b Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Tue, 13 Apr 2010 20:43:12 +0100 Subject: Supplementary fix for EXT-6663 TOS Screen logic for enabling agreement checkbox is questionable If the "alive" check on the ToS page returns before the browser plugin has loaded the Loading page, the checkbox never gets enabled, so postpone the check until the Loading page is up. --- indra/newview/llfloatertos.cpp | 38 ++++++++++++++++---------------------- indra/newview/llfloatertos.h | 2 -- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 3db9587797..104827f4a3 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -144,9 +144,6 @@ BOOL LLFloaterTOS::postBuild() // Don't use the start_url parameter for this browser instance -- it may finish loading before we get to add our observer. // Store the URL separately and navigate here instead. web_browser->navigateTo( getString( "loading_url" ) ); - - gResponsePtr = LLIamHere::build( this ); - LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); } return TRUE; @@ -163,10 +160,19 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) if ( alive ) { // navigate to the "real" page - loadIfNeeded(); + if(!mRealNavigateBegun && mSiteAlive) + { + LLMediaCtrl* web_browser = getChild("tos_html"); + if(web_browser) + { + mRealNavigateBegun = true; + web_browser->navigateTo( getString( "real_url" ) ); + } + } } else { + LL_INFOS("TOS") << "ToS page: ToS page unavailable!" << LL_ENDL; // normally this is set when navigation to TOS page navigation completes (so you can't accept before TOS loads) // but if the page is unavailable, we need to do this now LLCheckBoxCtrl* tos_agreement = getChild("agree_chk"); @@ -175,22 +181,8 @@ void LLFloaterTOS::setSiteIsAlive( bool alive ) } } -void LLFloaterTOS::loadIfNeeded() -{ - if(!mRealNavigateBegun && mSiteAlive) - { - LLMediaCtrl* web_browser = getChild("tos_html"); - if(web_browser) - { - mRealNavigateBegun = true; - web_browser->navigateTo( getString( "real_url" ) ); - } - } -} - LLFloaterTOS::~LLFloaterTOS() { - // tell the responder we're not here anymore if ( gResponsePtr ) gResponsePtr->setParent( 0 ); @@ -215,7 +207,7 @@ void LLFloaterTOS::updateAgree(LLUICtrl*, void* userdata ) void LLFloaterTOS::onContinue( void* userdata ) { LLFloaterTOS* self = (LLFloaterTOS*) userdata; - llinfos << "User agrees with TOS." << llendl; + LL_INFOS("TOS") << "User agrees with TOS." << LL_ENDL; if(self->mReplyPumpName != "") { @@ -229,7 +221,7 @@ void LLFloaterTOS::onContinue( void* userdata ) void LLFloaterTOS::onCancel( void* userdata ) { LLFloaterTOS* self = (LLFloaterTOS*) userdata; - llinfos << "User disagrees with TOS." << llendl; + LL_INFOS("TOS") << "User disagrees with TOS." << LL_ENDL; LLNotificationsUtil::add("MustAgreeToLogIn", LLSD(), LLSD(), login_alert_done); if(self->mReplyPumpName != "") @@ -254,11 +246,13 @@ void LLFloaterTOS::handleMediaEvent(LLPluginClassMedia* /*self*/, EMediaEvent ev if(!mLoadingScreenLoaded) { mLoadingScreenLoaded = true; - loadIfNeeded(); + + gResponsePtr = LLIamHere::build( this ); + LLHTTPClient::get( getString( "real_url" ), gResponsePtr ); } else if(mRealNavigateBegun) { - llinfos << "NAVIGATE COMPLETE" << llendl; + LL_INFOS("TOS") << "TOS: NAVIGATE COMPLETE" << LL_ENDL; // enable Agree to TOS radio button now that page has loaded LLCheckBoxCtrl * tos_agreement = getChild("agree_chk"); tos_agreement->setEnabled( true ); diff --git a/indra/newview/llfloatertos.h b/indra/newview/llfloatertos.h index 6ea56408ee..d985ccbab0 100644 --- a/indra/newview/llfloatertos.h +++ b/indra/newview/llfloatertos.h @@ -67,8 +67,6 @@ public: private: - void loadIfNeeded(); - std::string mMessage; int mWebBrowserWindowId; bool mLoadingScreenLoaded; -- cgit v1.2.3 From b15629c12f9371773998075f8b599527b73c3051 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Wed, 14 Apr 2010 15:22:51 -0400 Subject: This change originally to fix EXT-1655 has caused a failure to render sitting avatars (EXT-6835). We can probably find a "right" fix, but for now backing it out. Backed out changeset bd384ded4268 --- indra/newview/llagent.cpp | 10 +++++----- indra/newview/llvoavatar.cpp | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index d9d95f1cd6..c5d7f6f118 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,11 +2296,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -2308,6 +2303,11 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 16eb877b1d..f5e83ed025 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5619,8 +5619,6 @@ void LLVOAvatar::sitDown(BOOL bSitting) //----------------------------------------------------------------------------- void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) { - sitDown(TRUE); - if (isSelf()) { // Might be first sit @@ -5653,6 +5651,7 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); gPipeline.markMoved(mDrawable, TRUE); + sitDown(TRUE); mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject mRoot.setPosition(getPosition()); mRoot.updateWorldMatrixChildren(); -- cgit v1.2.3 From 628b143566b81e6029d9bd35f0dc76b79db9cdf8 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Wed, 14 Apr 2010 15:42:50 -0400 Subject: update version number --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 540aea4252..bacdc56746 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 2; const S32 LL_VERSION_MINOR = 0; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_PATCH = 1; const S32 LL_VERSION_BUILD = 200030; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From 347be0784281ce5fb15d1c762f37dc7a6c4f2bf6 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Tue, 20 Apr 2010 04:36:35 -0400 Subject: set the patch version --- indra/llcommon/llversionviewer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h index 540aea4252..bacdc56746 100644 --- a/indra/llcommon/llversionviewer.h +++ b/indra/llcommon/llversionviewer.h @@ -35,7 +35,7 @@ const S32 LL_VERSION_MAJOR = 2; const S32 LL_VERSION_MINOR = 0; -const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_PATCH = 1; const S32 LL_VERSION_BUILD = 200030; const char * const LL_CHANNEL = "Second Life Developer"; -- cgit v1.2.3 From 956041ff1b26edc7c90fb7dbdf0d6ebff82e48b8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 16 Apr 2010 12:04:41 +0300 Subject: Fixed major bug EXT-6851 (Moderator is unable to mute group voice chat participant after his reconnect) Reason: not proper condition to check is LLSpeaker is in voice channel (implemented for EXT-3944) Fix: Updated condition to check is speaker in voice channel state. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/242/ (transplanted from fb2af72d10231e04b2e79a7d487ea9e8559c14b8) --- indra/newview/llspeakers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 6cf9c6b95d..c04b5f98af 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -84,7 +84,7 @@ void LLSpeaker::onAvatarNameLookup(const LLUUID& id, const std::string& first, c bool LLSpeaker::isInVoiceChannel() { - return mStatus == LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; + return mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || mStatus == LLSpeaker::STATUS_MUTED; } LLSpeakerUpdateModeratorEvent::LLSpeakerUpdateModeratorEvent(LLSpeaker* source) -- cgit v1.2.3 From 4e76ec36a0e5bead2c806a06b62845488abf8fa5 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 14 Apr 2010 18:54:06 +0300 Subject: Fixed major bug EXT-6802 (Cancelling out of People Chooser while Searching Causes Crash) * Added check of Avatar Picker floater (People Chooser) against NULL in search callback. Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/236/ (transplanted from 480f67e4eac0223626ce549a20760e81c4bce5b1) --- indra/newview/llfloateravatarpicker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index a0b2de85f0..8b5d334c86 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -387,8 +387,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* LLFloaterAvatarPicker* floater = LLFloaterReg::findTypedInstance("avatar_picker"); - // these are not results from our last request - if (query_id != floater->mQueryID) + // floater is closed or these are not results from our last request + if (NULL == floater || query_id != floater->mQueryID) { return; } -- cgit v1.2.3 From bbe9b636b5f78e4fe6d1a4da56a4a66ffef407d1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 7 Apr 2010 18:33:05 +0300 Subject: Fixed major bug EXT-6661 (chat log paths reset back to default) * Removed unused InstantMessageLogFolder * Restored initializing logic of InstantMessageLogPath value from 1.23 to share setting between viewers. * Restored unused in 2.0 "LogChatTimestamp" and "LogChatIM" settings to avoid removing of them in 2.0 * Restored default value of the "Save local chat log" setting from 1.23 & replaced with 2.0 own setting (LogNearbyChat was: LogChat) Reviewed by Igor Borovkov & Kent Quirk at https://codereview.productengine.com/secondlife/r/193/ (transplanted from 43297b92c1bb7487dab6610bea61acac4c355878) --- .../newview/app_settings/settings_per_account.xml | 56 +++++++++++++++++----- indra/newview/llfloaterpreference.cpp | 6 +-- indra/newview/llnearbychat.cpp | 2 +- indra/newview/llstartup.cpp | 9 ++-- .../default/xui/en/panel_preferences_privacy.xml | 2 +- 5 files changed, 51 insertions(+), 24 deletions(-) diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml index af5fa4f388..3ce32a05b0 100644 --- a/indra/newview/app_settings/settings_per_account.xml +++ b/indra/newview/app_settings/settings_per_account.xml @@ -22,17 +22,6 @@ Value |TOKEN COPY BusyModeResponse| - InstantMessageLogFolder - - Comment - Top level folder to your log files. - Persist - 1 - Type - String - Value - - InstantMessageLogPath Comment @@ -55,10 +44,10 @@ Value 0 - LogChat + LogNearbyChat Comment - Log Chat + Log Nearby Chat messages to a file. Is used instead of LogChat but with the "1" default value. Persist 1 Type @@ -110,5 +99,46 @@ Value 1 + + + + + LogChat + + Comment + Log Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatIM + + Comment + Log Incoming Instant Messages with Chat + Persist + 1 + Type + Boolean + Value + 0 + + LogChatTimestamp + + Comment + Log Timestamp of Chat + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1172064b59..1491484ba9 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1093,10 +1093,8 @@ void LLFloaterPreference::onClickLogPath() { return; //Canceled! } - std::string chat_log_dir = picker.getDirName(); - std::string chat_log_top_folder= gDirUtilp->getBaseFileName(chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); + + gSavedPerAccountSettings.setString("InstantMessageLogPath", picker.getDirName()); } void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, const std::string& email) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index c8d5d782b7..5d72827a7a 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -207,7 +207,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) return; } - if (gSavedPerAccountSettings.getBOOL("LogChat")) + if (gSavedPerAccountSettings.getBOOL("LogNearbyChat")) { LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d4d6a74f0c..1c439d9d14 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -886,13 +886,12 @@ bool idle_startup() } //Default the path if one isn't set. - if (gSavedPerAccountSettings.getString("InstantMessageLogFolder").empty()) + // *NOTE: unable to check variable differ from "InstantMessageLogPath" because it was + // provided in pre 2.0 viewer. See EXT-6661 + if (gSavedPerAccountSettings.getString("InstantMessageLogPath").empty()) { gDirUtilp->setChatLogsDir(gDirUtilp->getOSUserAppDir()); - std::string chat_log_dir = gDirUtilp->getChatLogsDir(); - std::string chat_log_top_folder=gDirUtilp->getBaseFileName(chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogPath",chat_log_dir); - gSavedPerAccountSettings.setString("InstantMessageLogFolder",chat_log_top_folder); + gSavedPerAccountSettings.setString("InstantMessageLogPath", gDirUtilp->getChatLogsDir()); } else { diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 3d7f392404..fca9b4bca1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -84,7 +84,7 @@ Date: Fri, 16 Apr 2010 16:06:34 -0400 Subject: For EXT-6809 - search static VFS for all asset types --- indra/llmessage/llassetstorage.cpp | 105 +++++++++++++++++++++------------ indra/llmessage/llassetstorage.h | 6 +- indra/llmessage/llhttpassetstorage.cpp | 8 ++- indra/llmessage/llhttpassetstorage.h | 5 +- indra/newview/llappviewer.cpp | 7 +++ indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerassetstorage.cpp | 9 +-- indra/newview/llviewerassetstorage.h | 4 +- 8 files changed, 94 insertions(+), 52 deletions(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 0ab1081200..c3a786d59c 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -283,28 +283,30 @@ LLEstateAssetRequest::~LLEstateAssetRequest() // TODO: rework tempfile handling? -LLAssetStorage::LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, const LLHost &upstream_host) +LLAssetStorage::LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host) { - _init(msg, xfer, vfs, upstream_host); + _init(msg, xfer, vfs, static_vfs, upstream_host); } LLAssetStorage::LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs) + LLVFS *vfs, LLVFS *static_vfs) { - _init(msg, xfer, vfs, LLHost::invalid); + _init(msg, xfer, vfs, static_vfs, LLHost::invalid); } void LLAssetStorage::_init(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, + LLVFS *static_vfs, const LLHost &upstream_host) { mShutDown = FALSE; mMessageSys = msg; mXferManager = xfer; mVFS = vfs; + mStaticVFS = static_vfs; setUpstream(upstream_host); msg->setHandlerFuncFast(_PREHASH_AssetUploadComplete, processUploadComplete, (void **)this); @@ -396,7 +398,7 @@ void LLAssetStorage::_cleanupRequests(BOOL all, S32 error) BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type) { - return mVFS->getExists(uuid, type); + return mStaticVFS->getExists(uuid, type) || mVFS->getExists(uuid, type); } /////////////////////////////////////////////////////////////////////////// @@ -423,11 +425,48 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo return; } + { + // Try in static VFS first. + BOOL exists = mStaticVFS->getExists(uuid, type); + //exists = false; + if (exists) + { + LLVFile file(mStaticVFS, uuid, type); + U32 size = exists ? file.getSize() : 0; + if (size>0) + { + // we've already got the file + // theoretically, partial files w/o a pending request shouldn't happen + // unless there's a weird error + if (callback) + { + callback(mStaticVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + } + return; + } + else + { + llwarns << "Asset vfile " << uuid << ":" << type + << " found in static VFS with bad size " << file.getSize() << ", ignoring" << llendl; + } + } + } + BOOL exists = mVFS->getExists(uuid, type); LLVFile file(mVFS, uuid, type); U32 size = exists ? file.getSize() : 0; - if (size < 1) + if (size > 0) + { + // we've already got the file + // theoretically, partial files w/o a pending request shouldn't happen + // unless there's a weird error + if (callback) + { + callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + } + } + else { if (exists) { @@ -466,16 +505,6 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo // This can be overridden by subclasses _queueDataRequest(uuid, type, callback, user_data, duplicate, is_priority); } - else - { - // we've already got the file - // theoretically, partial files w/o a pending request shouldn't happen - // unless there's a weird error - if (callback) - { - callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); - } - } } void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType atype, @@ -620,7 +649,17 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen LLVFile file(mVFS, asset_id, atype); U32 size = exists ? file.getSize() : 0; - if (size < 1) + if (size > 0) + { + // we've already got the file + // theoretically, partial files w/o a pending request shouldn't happen + // unless there's a weird error + if (callback) + { + callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + } + } + else { if (exists) { @@ -671,16 +710,6 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen } } } - else - { - // we've already got the file - // theoretically, partial files w/o a pending request shouldn't happen - // unless there's a weird error - if (callback) - { - callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); - } - } } void LLAssetStorage::downloadEstateAssetCompleteCallback( @@ -758,7 +787,17 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age } - if (size < 1) + if (size > 0) + { + // we've already got the file + // theoretically, partial files w/o a pending request shouldn't happen + // unless there's a weird error + if (callback) + { + callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + } + } + else { // See whether we should talk to the object's originating sim, // or the upstream provider. @@ -807,16 +846,6 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age } } } - else - { - // we've already got the file - // theoretically, partial files w/o a pending request shouldn't happen - // unless there's a weird error - if (callback) - { - callback(mVFS, asset_id, atype, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); - } - } } diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 83cfdf6110..979ce14ad0 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -218,6 +218,7 @@ class LLAssetStorage : public LLTempAssetStorage public: // VFS member is public because static child methods need it :( LLVFS *mVFS; + LLVFS *mStaticVFS; typedef void (*LLStoreAssetCallback)(const LLUUID &asset_id, void *user_data, S32 status, LLExtStat ext_status); enum ERequestType @@ -247,10 +248,10 @@ protected: public: LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host); + LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host); LLAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs); + LLVFS *vfs, LLVFS *static_vfs); virtual ~LLAssetStorage(); void setUpstream(const LLHost &upstream_host); @@ -442,6 +443,7 @@ private: void _init(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, + LLVFS *static_vfs, const LLHost &upstream_host); protected: diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 1980735bbb..fc326790eb 100644 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -401,21 +401,23 @@ size_t LLHTTPAssetRequest::curlCompressedUploadCallback( LLHTTPAssetStorage::LLHTTPAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host, + LLVFS *vfs, LLVFS *static_vfs, + const LLHost &upstream_host, const std::string& web_host, const std::string& local_web_host, const std::string& host_name) - : LLAssetStorage(msg, xfer, vfs, upstream_host) + : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host) { _init(web_host, local_web_host, host_name); } LLHTTPAssetStorage::LLHTTPAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, LLVFS *vfs, + LLVFS *static_vfs, const std::string& web_host, const std::string& local_web_host, const std::string& host_name) - : LLAssetStorage(msg, xfer, vfs) + : LLAssetStorage(msg, xfer, vfs, static_vfs) { _init(web_host, local_web_host, host_name); } diff --git a/indra/llmessage/llhttpassetstorage.h b/indra/llmessage/llhttpassetstorage.h index 231437dad4..3e85e898e2 100644 --- a/indra/llmessage/llhttpassetstorage.h +++ b/indra/llmessage/llhttpassetstorage.h @@ -48,13 +48,14 @@ class LLHTTPAssetStorage : public LLAssetStorage { public: LLHTTPAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host, + LLVFS *vfs, LLVFS *static_vfs, + const LLHost &upstream_host, const std::string& web_host, const std::string& local_web_host, const std::string& host_name); LLHTTPAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, + LLVFS *vfs, LLVFS *static_vfs, const std::string& web_host, const std::string& local_web_host, const std::string& host_name); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f19a33301a..7895cee4ec 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3238,6 +3238,13 @@ bool LLAppViewer::initCache() else { LLVFile::initClass(); + + llinfos << "Static VFS listing" << llendl; + gStaticVFS->listFiles(); + + llinfos << "regular VFS listing" << llendl; + gVFS->listFiles(); + return true; } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d4d6a74f0c..0eae134983 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -561,7 +561,7 @@ bool idle_startup() gXferManager->setUseAckThrottling(TRUE); gXferManager->setAckThrottleBPS(xfer_throttle_bps); } - gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS); + gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS, gStaticVFS); F32 dropPercent = gSavedSettings.getF32("PacketDropPercentage"); diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index bb49804aff..c3a6b7111b 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -41,15 +41,16 @@ #include "llagent.h" LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host) - : LLAssetStorage(msg, xfer, vfs, upstream_host) + LLVFS *vfs, LLVFS *static_vfs, + const LLHost &upstream_host) + : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host) { } LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs) - : LLAssetStorage(msg, xfer, vfs) + LLVFS *vfs, LLVFS *static_vfs) + : LLAssetStorage(msg, xfer, vfs, static_vfs) { } diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index 512b590a1b..8e7ea3471d 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -42,10 +42,10 @@ class LLViewerAssetStorage : public LLAssetStorage { public: LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host); + LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host); LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs); + LLVFS *vfs, LLVFS *static_vfs); using LLAssetStorage::storeAssetData; virtual void storeAssetData( -- cgit v1.2.3 From 3b8ce1d18aafd7c0b4bc5eee4fb74054a7a1a819 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 16 Apr 2010 17:13:11 -0400 Subject: For EXT-6809 - search static VFS for all asset types --- indra/llmessage/llassetstorage.cpp | 68 ++++++++++++++++++++++++-------------- indra/llmessage/llassetstorage.h | 3 ++ 2 files changed, 46 insertions(+), 25 deletions(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index c3a786d59c..e65a488098 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -401,12 +401,41 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType return mStaticVFS->getExists(uuid, type) || mVFS->getExists(uuid, type); } +bool LLAssetStorage::findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, + LLGetAssetCallback callback, void *user_data) +{ + // Try in static VFS first. + BOOL exists = vfs->getExists(uuid, type); + if (exists) + { + LLVFile file(vfs, uuid, type); + U32 size = exists ? file.getSize() : 0; + if (size>0) + { + // we've already got the file + // theoretically, partial files w/o a pending request shouldn't happen + // unless there's a weird error + if (callback) + { + callback(vfs, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + return true; + } + } + else + { + llwarns << "Asset vfile " << uuid << ":" << type + << " found with bad size " << file.getSize() << ", ignoring" << llendl; + } + } + return false; +} + /////////////////////////////////////////////////////////////////////////// // GET routines /////////////////////////////////////////////////////////////////////////// // IW - uuid is passed by value to avoid side effects, please don't re-add & -void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, void (*callback)(LLVFS *vfs, const LLUUID&, LLAssetType::EType, void *, S32, LLExtStat), void *user_data, BOOL is_priority) +void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LLGetAssetCallback callback, void *user_data, BOOL is_priority) { lldebugs << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << llendl; @@ -425,31 +454,9 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, vo return; } + if (findInVFSAndInvokeCallback(mStaticVFS,uuid,type,callback,user_data)) { - // Try in static VFS first. - BOOL exists = mStaticVFS->getExists(uuid, type); - //exists = false; - if (exists) - { - LLVFile file(mStaticVFS, uuid, type); - U32 size = exists ? file.getSize() : 0; - if (size>0) - { - // we've already got the file - // theoretically, partial files w/o a pending request shouldn't happen - // unless there's a weird error - if (callback) - { - callback(mStaticVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); - } - return; - } - else - { - llwarns << "Asset vfile " << uuid << ":" << type - << " found in static VFS with bad size " << file.getSize() << ", ignoring" << llendl; - } - } + return; } BOOL exists = mVFS->getExists(uuid, type); @@ -645,6 +652,11 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen return; } + if (findInVFSAndInvokeCallback(mStaticVFS,asset_id,atype,callback,user_data)) + { + return; + } + BOOL exists = mVFS->getExists(asset_id, atype); LLVFile file(mVFS, asset_id, atype); U32 size = exists ? file.getSize() : 0; @@ -776,6 +788,12 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age if(asset_id.notNull()) { + // Try static VFS first. + if (findInVFSAndInvokeCallback(mStaticVFS, asset_id, atype, callback, user_data)) + { + return; + } + exists = mVFS->getExists(asset_id, atype); LLVFile file(mVFS, asset_id, atype); size = exists ? file.getSize() : 0; diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 979ce14ad0..39afa4b62c 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -258,6 +258,9 @@ public: virtual BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); + bool findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, + LLGetAssetCallback callback, void *user_data); + // public interface methods // note that your callback may get called BEFORE the function returns -- cgit v1.2.3 From ea6a3e8e7801425faa75fdd8a40b7990a58ee0d4 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 19 Apr 2010 13:32:07 +0300 Subject: Updated the reverted fix for critical bug EXT-1655 ([BSI] Always flying after pressing "Stand" to stand up from an object), also integrated the fix for EXT-6786 ('Stand' button is corrupted if movement control floater is opened). Added some clarifying comments. Reviewed by Tofu Linden at https://codereview.productengine.com/secondlife/r/253/. --HG-- branch : product-engine --- indra/newview/llagent.cpp | 12 +++++++----- indra/newview/llmoveview.cpp | 8 +++++++- indra/newview/llviewermessage.cpp | 3 +++ indra/newview/llvoavatar.cpp | 2 ++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index c5d7f6f118..5c54146caa 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -2296,6 +2296,13 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) { resetAxes(mAutoPilotTargetFacing); } + // Restore previous flying state before invoking mAutoPilotFinishedCallback to allow + // callback function to change the flying state (like in near_sit_down_point()). + // If the user cancelled, don't change the fly state + if (!user_cancel) + { + setFlying(mAutoPilotFlyOnStop); + } //NB: auto pilot can terminate for a reason other than reaching the destination if (mAutoPilotFinishedCallback) { @@ -2303,11 +2310,6 @@ void LLAgent::stopAutoPilot(BOOL user_cancel) } mLeaderID = LLUUID::null; - // If the user cancelled, don't change the fly state - if (!user_cancel) - { - setFlying(mAutoPilotFlyOnStop); - } setControlFlags(AGENT_CONTROL_STOP); if (user_cancel && !mAutoPilotBehaviorName.empty()) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 1853b511be..70053a7b48 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -199,7 +199,12 @@ void LLFloaterMove::setFlyingMode(BOOL fly) if (instance) { instance->setFlyingModeImpl(fly); - instance->showModeButtons(!fly); + LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject(); + BOOL is_sitting = avatar_object + && (avatar_object->getRegion() != NULL) + && (!avatar_object->isDead()) + && avatar_object->isSitting(); + instance->showModeButtons(!fly && !is_sitting); } if (fly) { @@ -695,6 +700,7 @@ void LLPanelStandStopFlying::onStandButtonClick() gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); setFocus(FALSE); // EXT-482 + mStandButton->setVisible(FALSE); // force visibility changing to avoid seeing Stand & Move buttons at once. } void LLPanelStandStopFlying::onStopFlyingButtonClick() diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3d0dfbed40..fab1d983c2 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4169,6 +4169,9 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) } gAgent.setForceMouselook(force_mouselook); + // Forcing turning off flying here to prevent flying after pressing "Stand" + // to stand up from an object. See EXT-1655. + gAgent.setFlying(FALSE); LLViewerObject* object = gObjectList.findObject(sitObjectID); if (object) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 981dd14093..86987f4c78 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -5653,6 +5653,8 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot); gPipeline.markMoved(mDrawable, TRUE); + // Notice that removing sitDown() from here causes avatars sitting on + // objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655. sitDown(TRUE); mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject mRoot.setPosition(getPosition()); -- cgit v1.2.3 From 7462911bddd9b5e4033d7108ffc1b6716068f489 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 19 Apr 2010 12:49:15 +0100 Subject: Change Linux fasttimer implementation back to RDTSC - using a reliable syscall was REALLY chewing CPU time. Sigh. I didn't realize how incredibly often this gets called. So, back to the assembly. But be more careful with CPU clock count on linux, so the fasttimer values are much more accurate than they were the last time we were with RDTSC, in absolute terms - back in the right order of magnitude anyway. Also change many instances of Mhz to MHz. Also some minor comment fixes. --- indra/llcommon/llfasttimer.h | 24 +++++++++++++++--------- indra/llcommon/llfasttimer_class.cpp | 6 +++--- indra/llcommon/llprocessor.cpp | 11 ++++++++++- indra/llcommon/llsys.cpp | 14 +++++++------- indra/llcommon/llsys.h | 4 ++-- indra/llcommon/lltimer.cpp | 2 +- indra/newview/llappviewer.cpp | 4 ++-- indra/newview/llfeaturemanager.cpp | 4 ++-- indra/newview/llviewerjoystick.cpp | 2 +- 9 files changed, 43 insertions(+), 28 deletions(-) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 48461df6ae..840d09d970 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -36,6 +36,10 @@ // pull in the actual class definition #include "llfasttimer_class.h" +// +// Important note: These implementations must be FAST! +// + #if LL_WINDOWS // // Windows implementation of CPU clock @@ -99,15 +103,17 @@ inline U64 LLFastTimer::getCPUClockCount64() #endif -#if LL_LINUX || LL_SOLARIS +#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) // -// Linux and Solaris implementation of CPU clock - all architectures. +// Linux and Solaris implementation of CPU clock - non-x86. +// This is accurate but SLOW! Only use out of desperation. // // Try to use the MONOTONIC clock if available, this is a constant time counter -// with nanosecond resolution (but not necessarily accuracy) and attempts are made -// to synchronize this value between cores at kernel start. It should not be affected -// by CPU frequency. If not available use the REALTIME clock, but this may be affected by -// NTP adjustments or other user activity affecting the system time. +// with nanosecond resolution (but not necessarily accuracy) and attempts are +// made to synchronize this value between cores at kernel start. It should not +// be affected by CPU frequency. If not available use the REALTIME clock, but +// this may be affected by NTP adjustments or other user activity affecting +// the system time. inline U64 LLFastTimer::getCPUClockCount64() { struct timespec tp; @@ -124,12 +130,12 @@ inline U32 LLFastTimer::getCPUClockCount32() { return (U32)(LLFastTimer::getCPUClockCount64() >> 8); } -#endif // (LL_LINUX || LL_SOLARIS)) +#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) -#if (LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) +#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__)) // -// Mac x86 implementation of CPU clock +// Mac+Linux+Solaris FAST x86 implementation of CPU clock inline U32 LLFastTimer::getCPUClockCount32() { U64 x; diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp index 2e5edb1f3b..f39a4e6619 100644 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -230,17 +230,17 @@ void LLFastTimer::DeclareTimer::updateCachedPointers() } //static -#if LL_LINUX || LL_SOLARIS || ( LL_DARWIN && !(defined(__i386__) || defined(__amd64__)) ) +#if (LL_DARWIN || LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__)) U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer { return sClockResolution >> 8; } -#else // windows or x86-mac +#else // windows or x86-mac or x86-linux or x86-solaris U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer { static U64 sCPUClockFrequency = U64(CProcessor().GetCPUFrequency(50)); - // we drop the low-order byte in out timers, so report a lower frequency + // we drop the low-order byte in our timers, so report a lower frequency return sCPUClockFrequency >> 8; } #endif diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 8a4a4a8f9a..f6ab55a6b5 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -60,6 +60,10 @@ # include #endif +#if LL_LINUX +#include "llsys.h" +#endif // LL_LINUX + #if !LL_DARWIN && !LL_SOLARIS #ifdef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE @@ -116,6 +120,11 @@ CProcessor::CProcessor() //////////////////////////////////////////////////////////////////////////// F64 CProcessor::GetCPUFrequency(unsigned int uiMeasureMSecs) { +#if LL_LINUX + // use the shinier LLCPUInfo interface + return 1000000.0F * gSysCPU.getMHz(); +#endif + #ifndef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE return 0; #else @@ -781,7 +790,7 @@ bool CProcessor::AnalyzeAMDProcessor() case 5: // Family = 5: K5 / K6 processor family switch (CPUInfo.uiModel) { - case 0: // Model = 0: K5 SSA 5 (Pentium Rating *ggg* 75, 90 and 100 Mhz) + case 0: // Model = 0: K5 SSA 5 (Pentium Rating *ggg* 75, 90 and 100 MHz) strcpy(CPUInfo.strModel, "AMD K5 SSA5 (PR75, PR90, PR100)"); /* Flawfinder: ignore */ strncat(strCPUName, "AMD K5 SSA5 (PR75, PR90, PR100)", sizeof(strCPUName) - strlen(strCPUName) -1); /* Flawfinder: ignore */ break; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 0272c55db2..52b1b63209 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -519,15 +519,15 @@ LLCPUInfo::LLCPUInfo() mHasSSE = info->_Ext.SSE_StreamingSIMD_Extensions; mHasSSE2 = info->_Ext.SSE2_StreamingSIMD2_Extensions; mHasAltivec = info->_Ext.Altivec_Extensions; - mCPUMhz = (S32)(proc.GetCPUFrequency(50)/1000000.0); + mCPUMHz = (F64)(proc.GetCPUFrequency(50)/1000000.0F); mFamily.assign( info->strFamily ); mCPUString = "Unknown"; #if LL_WINDOWS || LL_DARWIN || LL_SOLARIS out << proc.strCPUName; - if (200 < mCPUMhz && mCPUMhz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check + if (200 < mCPUMHz && mCPUMHz < 10000) // *NOTE: cpu speed is often way wrong, do a sanity check { - out << " (" << mCPUMhz << " MHz)"; + out << " (" << mCPUMHz << " MHz)"; } mCPUString = out.str(); @@ -572,7 +572,7 @@ LLCPUInfo::LLCPUInfo() if (LLStringUtil::convertToF64(cpuinfo["cpu mhz"], mhz) && 200.0 < mhz && mhz < 10000.0) { - mCPUMhz = (S32)llrint(mhz); + mCPUMHz = (F64)(mhz); } if (!cpuinfo["model name"].empty()) mCPUString = cpuinfo["model name"]; @@ -595,9 +595,9 @@ bool LLCPUInfo::hasSSE2() const return mHasSSE2; } -S32 LLCPUInfo::getMhz() const +F64 LLCPUInfo::getMHz() const { - return mCPUMhz; + return mCPUMHz; } std::string LLCPUInfo::getCPUString() const @@ -644,7 +644,7 @@ void LLCPUInfo::stream(std::ostream& s) const s << "->mHasSSE: " << (U32)mHasSSE << std::endl; s << "->mHasSSE2: " << (U32)mHasSSE2 << std::endl; s << "->mHasAltivec: " << (U32)mHasAltivec << std::endl; - s << "->mCPUMhz: " << mCPUMhz << std::endl; + s << "->mCPUMHz: " << mCPUMHz << std::endl; s << "->mCPUString: " << mCPUString << std::endl; } diff --git a/indra/llcommon/llsys.h b/indra/llcommon/llsys.h index c2c45bec9a..0b34951149 100644 --- a/indra/llcommon/llsys.h +++ b/indra/llcommon/llsys.h @@ -81,7 +81,7 @@ public: bool hasAltivec() const; bool hasSSE() const; bool hasSSE2() const; - S32 getMhz() const; + F64 getMHz() const; // Family is "AMD Duron" or "Intel Pentium Pro" const std::string& getFamily() const { return mFamily; } @@ -90,7 +90,7 @@ private: bool mHasSSE; bool mHasSSE2; bool mHasAltivec; - S32 mCPUMhz; + F64 mCPUMHz; std::string mFamily; std::string mCPUString; }; diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 25b768079b..6111db2bfa 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -209,7 +209,7 @@ F64 calc_clock_frequency(U32 uiMeasureMSecs) // Both Linux and Mac use gettimeofday for accurate time F64 calc_clock_frequency(unsigned int uiMeasureMSecs) { - return 1000000.0; // microseconds, so 1 Mhz. + return 1000000.0; // microseconds, so 1 MHz. } U64 get_clock_count() diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 78163adf47..319d9b02a9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -862,7 +862,7 @@ bool LLAppViewer::init() minSpecs += "\n"; unsupported = true; } - if(gSysCPU.getMhz() < minCPU) + if(gSysCPU.getMHz() < minCPU) { minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); minSpecs += "\n"; @@ -2524,7 +2524,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); - gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); + gDebugInfo["CPUInfo"]["CPUMhz"] = (S32)gSysCPU.getMHz(); gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fbb90c69f3..50b08f782a 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -621,9 +621,9 @@ void LLFeatureManager::applyBaseMasks() #if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? - if (gSysCPU.getMhz() < 800) + if (gSysCPU.getMHz() < 800) #else - if (gSysCPU.getMhz() < 1100) + if (gSysCPU.getMHz() < 1100) #endif { maskFeatures("CPUSlow"); diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index b758f6c701..240a539f2e 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -163,7 +163,7 @@ LLViewerJoystick::LLViewerJoystick() memset(mBtn, 0, sizeof(mBtn)); // factor in bandwidth? bandwidth = gViewerStats->mKBitStat - mPerfScale = 4000.f / gSysCPU.getMhz(); + mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm. why? } // ----------------------------------------------------------------------------- -- cgit v1.2.3 From 80ebd31ac474dfc1c9521b994b6abffe66a1562c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 19 Apr 2010 13:08:33 +0100 Subject: trivial comment fix. --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 319d9b02a9..532391e590 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2537,7 +2537,7 @@ void LLAppViewer::writeSystemInfo() // which may have been the intended grid. This can b gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); - // *FIX:Mani - move this ddown in llappviewerwin32 + // *FIX:Mani - move this down in llappviewerwin32 #ifdef LL_WINDOWS DWORD thread_id = GetCurrentThreadId(); gDebugInfo["MainloopThreadID"] = (S32)thread_id; -- cgit v1.2.3 From 695e4bc17126baa282c7f27e8ac9ef1c3323fa77 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 19 Apr 2010 10:00:06 -0400 Subject: For EXT-6809 - search static VFS for all asset types --- indra/llmessage/llassetstorage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index e65a488098..f8b929769d 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -418,8 +418,8 @@ bool LLAssetStorage::findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, if (callback) { callback(vfs, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); - return true; } + return true; } else { @@ -454,6 +454,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL return; } + // Try static VFS first. if (findInVFSAndInvokeCallback(mStaticVFS,uuid,type,callback,user_data)) { return; @@ -652,6 +653,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen return; } + // Try static VFS first. if (findInVFSAndInvokeCallback(mStaticVFS,asset_id,atype,callback,user_data)) { return; -- cgit v1.2.3 From 1c352ebb5bfda6d53c844dca130302b79b918796 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 19 Apr 2010 15:23:04 +0100 Subject: repair merge from viewer-hotfix w.r.t. agent API changes. --- indra/newview/llmoveview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 7df5a33313..2f22512aba 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -200,7 +200,7 @@ void LLFloaterMove::setFlyingMode(BOOL fly) if (instance) { instance->setFlyingModeImpl(fly); - LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject(); + LLVOAvatarSelf* avatar_object = gAgentAvatarp; bool is_sitting = avatar_object && (avatar_object->getRegion() != NULL) && (!avatar_object->isDead()) -- cgit v1.2.3 From aa5e494e0cf1242dcd35725576667ab1a935363a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 19 Apr 2010 13:52:59 -0400 Subject: For EXT-6809 - fixes suggested by Nyx code review --- indra/llmessage/llassetstorage.cpp | 21 +++++++++------------ indra/llmessage/llassetstorage.h | 6 +++--- indra/newview/llappviewer.cpp | 8 ++++---- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index a35ea488b4..20d71c6903 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -401,30 +401,27 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType return mStaticVFS->getExists(uuid, type) || mVFS->getExists(uuid, type); } -bool LLAssetStorage::findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, - LLGetAssetCallback callback, void *user_data) +bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type, + LLGetAssetCallback callback, void *user_data) { - // Try in static VFS first. - BOOL exists = vfs->getExists(uuid, type); + BOOL exists = mStaticVFS->getExists(uuid, type); if (exists) { - LLVFile file(vfs, uuid, type); + LLVFile file(mStaticVFS, uuid, type); U32 size = exists ? file.getSize() : 0; if (size>0) { // we've already got the file - // theoretically, partial files w/o a pending request shouldn't happen - // unless there's a weird error if (callback) { - callback(vfs, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); + callback(mStaticVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED); } return true; } else { llwarns << "Asset vfile " << uuid << ":" << type - << " found with bad size " << file.getSize() << ", ignoring" << llendl; + << " found in static cache with bad size " << file.getSize() << ", ignoring" << llendl; } } return false; @@ -457,7 +454,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL } // Try static VFS first. - if (findInVFSAndInvokeCallback(mStaticVFS,uuid,type,callback,user_data)) + if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data)) { return; } @@ -660,7 +657,7 @@ void LLAssetStorage::getEstateAsset(const LLHost &object_sim, const LLUUID &agen } // Try static VFS first. - if (findInVFSAndInvokeCallback(mStaticVFS,asset_id,atype,callback,user_data)) + if (findInStaticVFSAndInvokeCallback(asset_id,atype,callback,user_data)) { return; } @@ -797,7 +794,7 @@ void LLAssetStorage::getInvItemAsset(const LLHost &object_sim, const LLUUID &age if(asset_id.notNull()) { // Try static VFS first. - if (findInVFSAndInvokeCallback(mStaticVFS, asset_id, atype, callback, user_data)) + if (findInStaticVFSAndInvokeCallback( asset_id, atype, callback, user_data)) { return; } diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 39afa4b62c..e97b398ca7 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -258,9 +258,6 @@ public: virtual BOOL hasLocalAsset(const LLUUID &uuid, LLAssetType::EType type); - bool findInVFSAndInvokeCallback(LLVFS *vfs, const LLUUID& uuid, LLAssetType::EType type, - LLGetAssetCallback callback, void *user_data); - // public interface methods // note that your callback may get called BEFORE the function returns @@ -319,6 +316,9 @@ public: void markAssetToxic( const LLUUID& uuid ); protected: + bool findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type, + LLGetAssetCallback callback, void *user_data); + virtual LLSD getPendingDetailsImpl(const request_list_t* requests, LLAssetType::EType asset_type, const std::string& detail_prefix) const; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c23ccfa4fb..d6f2440ede 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3243,11 +3243,11 @@ bool LLAppViewer::initCache() { LLVFile::initClass(); - llinfos << "Static VFS listing" << llendl; - gStaticVFS->listFiles(); + //llinfos << "Static VFS listing" << llendl; + //gStaticVFS->listFiles(); - llinfos << "regular VFS listing" << llendl; - gVFS->listFiles(); + //llinfos << "regular VFS listing" << llendl; + //gVFS->listFiles(); return true; } -- cgit v1.2.3 From 3afda3d1c020647604748ef5001526ca3fcf0759 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 19 Apr 2010 17:01:47 -0700 Subject: EXT-6921 - Media Volume Changes changes system volume on WinXP reviewed by Callum --- .../media_plugins/webkit/windows_volume_catcher.cpp | 21 +++++++++++++++------ indra/newview/llpanelnearbymedia.cpp | 5 ----- indra/newview/llpanelprimmediacontrols.cpp | 19 +++++-------------- indra/newview/llviewermedia.h | 6 ------ 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/indra/media_plugins/webkit/windows_volume_catcher.cpp b/indra/media_plugins/webkit/windows_volume_catcher.cpp index 1c1ef0b42f..8debe8fac6 100644 --- a/indra/media_plugins/webkit/windows_volume_catcher.cpp +++ b/indra/media_plugins/webkit/windows_volume_catcher.cpp @@ -232,14 +232,22 @@ VolumeCatcherImpl::VolumeCatcherImpl() : mVolume(1.0f), // default volume is max mPan(0.f) // default pan is centered { - // for each reported mixer "device", create a proxy object and add to list - U32 num_mixers = mixerGetNumDevs(); - for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) + OSVERSIONINFOEX V = {sizeof(OSVERSIONINFOEX)}; //EX for NT 5.0 and later + + ::GetVersionEx((POSVERSIONINFO)&V); + + // disable volume on XP and below + if (V.dwPlatformId == VER_PLATFORM_WIN32_NT && V.dwMajorVersion >= 6) { - Mixer* mixerp = Mixer::create(mixer_index); - if (mixerp) + // for each reported mixer "device", create a proxy object and add to list + U32 num_mixers = mixerGetNumDevs(); + for (U32 mixer_index = 0; mixer_index < num_mixers; ++mixer_index) { - mMixers.push_back(mixerp); + Mixer* mixerp = Mixer::create(mixer_index); + if (mixerp) + { + mMixers.push_back(mixerp); + } } } } @@ -279,6 +287,7 @@ void VolumeCatcherImpl::setVolume(F32 volume) } } + mVolume = volume; } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 79786c06d9..6411cd802d 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1062,15 +1062,10 @@ void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool mStopCtrl->setVisible(playing); mPlayCtrl->setVisible(!playing); mPauseCtrl->setVisible(false); -#ifdef PER_MEDIA_VOLUME mVolumeSliderCtrl->setVisible(true); mMuteCtrl->setVisible(true); mMuteBtn->setValue(muted); mVolumeSlider->setValue(volume); -#else - mVolumeSliderCtrl->setVisible(false); - mMuteCtrl->setVisible(false); -#endif mZoomCtrl->setVisible(include_zoom && !is_zoomed); mUnzoomCtrl->setVisible(include_zoom && is_zoomed); mStopCtrl->setEnabled(true); diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 5209d50755..0648d99685 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -350,6 +350,11 @@ void LLPanelPrimMediaControls::updateShape() mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; + mVolumeCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); + mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); + if(media_plugin && media_plugin->pluginSupportsMediaTime()) { mReloadCtrl->setEnabled(false); @@ -462,14 +467,6 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); -#ifdef PER_MEDIA_VOLUME - // these should be pulled up above the pluginSupportsMediaTime - // if check once we always have PER_MEDIA_VOLUME turned on - mVolumeCtrl->setVisible(has_focus); - mVolumeCtrl->setEnabled(has_focus); - mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); - mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); - if(media_impl->getVolume() <= 0.0) { mMuteBtn->setToggleState(true); @@ -478,12 +475,6 @@ void LLPanelPrimMediaControls::updateShape() { mMuteBtn->setToggleState(false); } -#else - mVolumeCtrl->setVisible(FALSE); - mVolumeSliderCtrl->setVisible(FALSE); - mVolumeCtrl->setEnabled(FALSE); - mVolumeSliderCtrl->setEnabled(FALSE); -#endif if (mMediaPanelScroll) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index bc6716697e..e829d7a5b4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -46,12 +46,6 @@ #include "llurl.h" - -#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD ) -#define PER_MEDIA_VOLUME -#endif - - class LLViewerMediaImpl; class LLUUID; class LLViewerMediaTexture; -- cgit v1.2.3 From c3fa45282f5bdb0cb7a3fcd680154e88cafde4bb Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Mon, 19 Apr 2010 17:19:35 -0700 Subject: Fix for EXT-6925 (Mime type association missing for video/* wildcard). In mime_types*.xml, added sections to the mimetype entries for video/* and audio/* which point to the quicktime plugin on Mac/Windows and gstreamer on Linux. Reviewed by Callum at http://codereview.lindenlab.com/1252035 --- indra/newview/skins/default/xui/en/mime_types.xml | 6 ++++++ indra/newview/skins/default/xui/en/mime_types_linux.xml | 6 ++++++ indra/newview/skins/default/xui/en/mime_types_mac.xml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/indra/newview/skins/default/xui/en/mime_types.xml b/indra/newview/skins/default/xui/en/mime_types.xml index 76c0d027f3..8e1e5ff062 100644 --- a/indra/newview/skins/default/xui/en/mime_types.xml +++ b/indra/newview/skins/default/xui/en/mime_types.xml @@ -138,6 +138,9 @@ audio + + media_plugin_quicktime +