Commits

Vadim Savchuk committed 9496326 Merge

Merge from default branch

  • Participants
  • Parent commits 29ae95f, eb57879
  • Branches product-engine

Comments (0)

Files changed (35)

File indra/llcommon/llfasttimer.h

 // 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
 #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;
 {
 	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;

File indra/llcommon/llfasttimer_class.cpp

 }
 
 //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

File indra/llcommon/llprocessor.cpp

 #	include <windows.h>
 #endif
 
+#if LL_LINUX
+#include "llsys.h"
+#endif // LL_LINUX
+
 #if !LL_DARWIN && !LL_SOLARIS
 
 #ifdef PROCESSOR_FREQUENCY_MEASURE_AVAILABLE
 ////////////////////////////////////////////////////////////////////////////
 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
 		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;

File indra/llcommon/llsys.cpp

 	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();
 	
 	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"];
 	return mHasSSE2;
 }
 
-S32 LLCPUInfo::getMhz() const
+F64 LLCPUInfo::getMHz() const
 {
-	return mCPUMhz;
+	return mCPUMHz;
 }
 
 std::string LLCPUInfo::getCPUString() 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;
 }
 

File indra/llcommon/llsys.h

 	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; }
 	bool mHasSSE;
 	bool mHasSSE2;
 	bool mHasAltivec;
-	S32 mCPUMhz;
+	F64 mCPUMHz;
 	std::string mFamily;
 	std::string mCPUString;
 };

File indra/llcommon/lltimer.cpp

 // 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()

File indra/llcommon/llversionviewer.h

 
 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 = 203110;
 
 const char * const LL_CHANNEL = "Second Life Developer";

File indra/llmessage/llassetstorage.cpp

 // 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);
 
 BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType type)
 {
-	return mVFS->getExists(uuid, type);
+	return mStaticVFS->getExists(uuid, type) || mVFS->getExists(uuid, type);
+}
+
+bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
+													  LLGetAssetCallback callback, void *user_data)
+{
+	BOOL exists = mStaticVFS->getExists(uuid, type);
+	if (exists)
+	{
+		LLVFile file(mStaticVFS, uuid, type);
+		U32 size = exists ? file.getSize() : 0;
+		if (size>0)
+		{
+			// we've already got the file
+			if (callback)
+			{
+				callback(mStaticVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
+			}
+			return true;
+		}
+		else
+		{
+			llwarns << "Asset vfile " << uuid << ":" << type
+					<< " found in static cache with bad size " << file.getSize() << ", ignoring" << llendl;
+		}
+	}
+	return false;
 }
 
 ///////////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////////
 
 // 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;
 
 		return;
 	}
 
+	// Try static VFS first.
+	if (findInStaticVFSAndInvokeCallback(uuid,type,callback,user_data))
+	{
+		return;
+	}
+
 	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)
 		{
 		// 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
 		llinfos << "ASSET_TRACE asset " << uuid << " found in VFS" << llendl;
 
-		if (callback)
-		{
-			callback(mVFS, uuid, type, user_data, LL_ERR_NOERR, LL_EXSTAT_VFS_CACHED);
-		}
-	}
 }
 
 void LLAssetStorage::_queueDataRequest(const LLUUID& uuid, LLAssetType::EType atype,
 		return;
 	}
 
+	// Try static VFS first.
+	if (findInStaticVFSAndInvokeCallback(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;
 
-	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)
 		{
 			}
 		}
 	}
-	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(
 
 	if(asset_id.notNull())
 	{
+		// Try static VFS first.
+		if (findInStaticVFSAndInvokeCallback( asset_id, atype, callback, user_data))
+		{
+			return;
+		}
+
 		exists = mVFS->getExists(asset_id, atype);
 		LLVFile file(mVFS, asset_id, atype);
 		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
 	{
 		// See whether we should talk to the object's originating sim,
 		// or the upstream provider.
 			}
 		}
 	}
-	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);
-		}
-	}
 }
 
 

File indra/llmessage/llassetstorage.h

 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
 
 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);
 	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;
 	void _init(LLMessageSystem *msg,
 			   LLXferManager *xfer,
 			   LLVFS *vfs,
+			   LLVFS *static_vfs,
 			   const LLHost &upstream_host);
 
 protected:

File indra/llmessage/llhttpassetstorage.cpp

 
 
 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);
 }

File indra/llmessage/llhttpassetstorage.h

 {
 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);

File indra/media_plugins/webkit/windows_volume_catcher.cpp

 :	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);
+			}
 		}
 	}
 }
 		}
 
 	}
+
 	mVolume = volume;
 }
 

File indra/newview/llagent.cpp

 		{
 			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)
 		{
 		}
 		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())

File indra/newview/llappviewer.cpp

 			minSpecs += "\n";
 			unsupported = true;
 		}
-		if(gSysCPU.getMhz() < minCPU)
+		if(gSysCPU.getMHz() < minCPU)
 		{
 			minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
 			minSpecs += "\n";
 
 	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();
 	// 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;
 	else
 	{
 		LLVFile::initClass();
+
+		//llinfos << "Static VFS listing" << llendl;
+		//gStaticVFS->listFiles();
+
+		//llinfos << "regular VFS listing" << llendl;
+		//gVFS->listFiles();
+		
 		return true;
 	}
 }

File indra/newview/llfeaturemanager.cpp

 	
 #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");

File indra/newview/llfloateravatarpicker.cpp

File contents unchanged.

File indra/newview/llfloaterpreference.cpp

File contents unchanged.

File indra/newview/llfloatertos.cpp

 		// 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;
 		if ( alive )
 		{
 			// navigate to the "real" page 
-			loadIfNeeded();
+			if(!mRealNavigateBegun && mSiteAlive)
+			{
+				LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("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<LLCheckBoxCtrl>("agree_chk");
 	}
 }
 
-void LLFloaterTOS::loadIfNeeded()
-{
-	if(!mRealNavigateBegun && mSiteAlive)
-	{
-		LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("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 );
 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 != "")
 	{
 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 != "")
 		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<LLCheckBoxCtrl>("agree_chk");
 			tos_agreement->setEnabled( true );

File indra/newview/llfloatertos.h

 
 private:
 
-	void			loadIfNeeded();
-	
 	std::string		mMessage;
 	int				mWebBrowserWindowId;
 	bool			mLoadingScreenLoaded;

File indra/newview/llmoveview.cpp

 	if (instance)
 	{
 		instance->setFlyingModeImpl(fly);
-		BOOL is_sitting = isAgentAvatarValid() && gAgentAvatarp->isSitting();
+		LLVOAvatarSelf* avatar_object = gAgentAvatarp;
+		bool is_sitting = avatar_object
+			&& (avatar_object->getRegion() != NULL)
+			&& (!avatar_object->isDead())
+			&& avatar_object->isSitting();
 		instance->showModeButtons(!fly && !is_sitting);
 	}
 	if (fly)

File indra/newview/llpanelnearbymedia.cpp

 	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);

File indra/newview/llpanelprimmediacontrols.cpp

 		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);
 			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);
 			{
 				mMuteBtn->setToggleState(false);
 			}
-#else
-			mVolumeCtrl->setVisible(FALSE);
-			mVolumeSliderCtrl->setVisible(FALSE);
-			mVolumeCtrl->setEnabled(FALSE);
-			mVolumeSliderCtrl->setEnabled(FALSE);
-#endif
 
 			if (mMediaPanelScroll)
 			{

File indra/newview/llspeakers.cpp

File contents unchanged.

File indra/newview/llstartup.cpp

 				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");

File indra/newview/llviewerassetstorage.cpp

 #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)
 {
 }
 

File indra/newview/llviewerassetstorage.h

 {
 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(

File indra/newview/llviewerjoystick.cpp

 	memset(mBtn, 0, sizeof(mBtn));
 
 	// factor in bandwidth? bandwidth = gViewerStats->mKBitStat
-	mPerfScale = 4000.f / gSysCPU.getMhz();
+	mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm.  why?
 }
 
 // -----------------------------------------------------------------------------

File indra/newview/llviewermedia.h

 
 #include "llurl.h"
 
-
-#if defined(LL_DARWIN) || (LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD )
-#define PER_MEDIA_VOLUME
-#endif
-
-
 class LLViewerMediaImpl;
 class LLUUID;
 class LLViewerMediaTexture;

File indra/newview/llviewermessage.cpp

 	}
 	
 	gAgentCamera.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)

File indra/newview/llvoavatar.cpp

 /** 
  * @File llvoavatar.cpp
- * @brief Implementation of LLVOAvatar class which is a derivation fo LLViewerObject
+ * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$
  * 
 	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());

File indra/newview/llvoavatar.h

 /**
  * @file llvoavatar.h
- * @brief Declaration of LLVOAvatar class which is a derivation fo
+ * @brief Declaration of LLVOAvatar class which is a derivation of
  * LLViewerObject
  *
  * $LicenseInfo:firstyear=2001&license=viewergpl$

File indra/newview/skins/default/xui/en/mime_types.xml

 		<widgettype>
 			audio
 		</widgettype>
+		<impl>
+			media_plugin_quicktime
+		</impl>
 	</mimetype>
 	<mimetype name="video/*">
 		<label name="video2_label">
 		<widgettype>
 			movie
 		</widgettype>
+		<impl>
+			media_plugin_quicktime
+		</impl>
 	</mimetype>
 	<mimetype name="image/*">
 		<label name="image2_label">

File indra/newview/skins/default/xui/en/mime_types_linux.xml

 		<widgettype>
 			audio
 		</widgettype>
+		<impl>
+			media_plugin_gstreamer
+		</impl>
 	</mimetype>
 	<mimetype name="video/*">
 		<label name="video2_label">
 		<widgettype>
 			movie
 		</widgettype>
+		<impl>
+			media_plugin_gstreamer
+		</impl>
 	</mimetype>
 	<mimetype name="image/*">
 		<label name="image2_label">

File indra/newview/skins/default/xui/en/mime_types_mac.xml

 		<widgettype>
 			audio
 		</widgettype>
+		<impl>
+			media_plugin_quicktime
+		</impl>
 	</mimetype>
 	<mimetype name="video/*">
 		<label name="video2_label">
 		<widgettype>
 			movie
 		</widgettype>
+		<impl>
+			media_plugin_quicktime
+		</impl>
 	</mimetype>
 	<mimetype name="image/*">
 		<label name="image2_label">
           <key>darwin</key>
           <map>
             <key>md5sum</key>
-            <string>38d836fa53d073b9f197eecd0f5615f0</string>
+            <string>3b7fa3a7ac07034a747759f22956b6d5</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-darwin-20100319.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-darwin-20100412.tar.bz2</uri>
           </map>
           <key>linux</key>
           <map>
             <key>md5sum</key>
-            <string>dd8dd1c223ecb8b232bf626cca6c63ac</string>
+            <string>3f834e00fa06e636814f22ad8685e407</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-linux-20100319.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-linux-20100412.tar.bz2</uri>
           </map>
           <key>windows</key>
           <map>
             <key>md5sum</key>
-            <string>8b4ce60f25823cd38896cb3b7eb0dd43</string>
+            <string>089a715a33cb48e030c9206966dfe31b</string>
             <key>url</key>
-            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8181-windows-20100319.tar.bz2</uri>
+            <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-3.1.0001.8385-windows-20100412.tar.bz2</uri>
           </map>
         </map>
       </map>