diff --git a/doc/contributions.txt b/doc/contributions.txt
index cd9745b0f906d17d0172b13eaa89521d4b295e44..4546053b2f056c87833067724e077cd9d49db452 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -5,7 +5,7 @@ received from them.  To see more about these contributions, visit
 http://jira.secondlife.com/ and enter the issue identifier.
 
 Able Whitman - VWR-650
-Alissa Sabre - VWR-81, VWR-83, VWR-171, VWR-251, VWR-414, VWR-415, VWR-459, VWR-606, VWR-652
+Alissa Sabre - VWR-81, VWR-83, VWR-171, VWR-251, VWR-414, VWR-415, VWR-459, VWR-606, VWR-652, VWR-1351, VWR-1410
 Argent Stonecutter - VWR-68
 Benja Kepler - VWR-746
 Blakar Ogre - VWR-881
@@ -17,15 +17,17 @@ Duckless Vandyke - VWR-383
 Dylan Haskell - VWR-72
 Dzonatas Sol - VWR-198, VWR-878
 Eddy Stryker - VWR-15, VWR-23
+Fremont Cunningham - VWR-1147
 Gigs Taggart - VWR-71, VWR-326, VWR-1217
 Ginko Bayliss - VWR-4
 Hikkoshi Sakai - VWR-429
 Hiro Sommambulist - VWR-66, VWR-97, VWR-100, VWR-105, VWR-108, VWR-118, VWR-132, VWR-136, VWR-143
+Iskar Ariantho - VWR-1223
 Jacek Antonelli - VWR-165, VWR-188, VWR-427, VWR-597
 Joghert LeSabre - VWR-64
 Kage Pixel - VWR-11
 Kunnis Basiat - VWR-82
-Nicholaz Beresford - VWR-132, VWR-176, VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-869, VWR-870, VWR-871, VWR-873, VWR-908, VWR-966
+Nicholaz Beresford - VWR-132, VWR-176, VWR-793, VWR-794, VWR-802, VWR-803, VWR-804, VWR-805, VWR-808, VWR-809, VWR-810, VWR-823, VWR-869, VWR-870, VWR-871, VWR-873, VWR-908, VWR-966, VWR-1410, VWR-1418
 Paul Churchill - VWR-20
 Paula Innis - VWR-30, VWR-1049
 Peekay Semyorka - VWR-7, VWR-19, VWR-49, VWR-79
@@ -38,6 +40,7 @@ Still Defiant - VWR-207, VWR-446
 Strife Onizuka - SVC-9, VWR-74, VWR-85, VWR-148
 tenebrous pau - VWR-247
 TBBle Kurosawa - VWR-938, VWR-941, VWR-944
+Tharax Ferraris - VWR-605
 Zi Ree - VWR-671, VWR-682, VWR-1140
 Zipherius Turas - VWR-76, VWR-77
 
diff --git a/indra/llcharacter/llheadrotmotion.cpp b/indra/llcharacter/llheadrotmotion.cpp
index 66b675e34de16c1ac54621a3b9aa18cce46e88ce..cbce927ced20e915a9d39f7d28dc8025c89be0b1 100644
--- a/indra/llcharacter/llheadrotmotion.cpp
+++ b/indra/llcharacter/llheadrotmotion.cpp
@@ -418,6 +418,10 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
 		up.setVec(eye_look_at % left);
 
 		target_eye_rot = LLQuaternion(eye_look_at, left, up);
+		// convert target rotation to head-local coordinates
+		target_eye_rot *= ~mHeadJoint->getWorldRotation();
+		// constrain target orientation to be in front of avatar's face
+		target_eye_rot.constrain(EYE_ROT_LIMIT_ANGLE);
 
 		// calculate vergence
 		F32 interocular_dist = (mLeftEyeState.getJoint()->getWorldPosition() - mRightEyeState.getJoint()->getWorldPosition()).magVec();
@@ -426,7 +430,7 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
 	}
 	else
 	{
-		target_eye_rot = mHeadJoint->getWorldRotation();
+		target_eye_rot = LLQuaternion::DEFAULT;
 		vergence = 0.f;
 	}
 
@@ -468,18 +472,8 @@ BOOL LLEyeMotion::onUpdate(F32 time, U8* joint_mask)
 	vergence_quat.transQuat();
 	right_eye_rot = vergence_quat * eye_jitter_rot * right_eye_rot;
 
-	//set final eye rotations
-	// start with left
-	LLQuaternion tQw = mLeftEyeState.getJoint()->getParent()->getWorldRotation();
-	LLQuaternion tQh = left_eye_rot * ~tQw;
-	tQh.constrain(EYE_ROT_LIMIT_ANGLE);
-	mLeftEyeState.setRotation( tQh );
-
-	// now do right eye
-	tQw = mRightEyeState.getJoint()->getParent()->getWorldRotation();
-	tQh = right_eye_rot * ~tQw;
-	tQh.constrain(EYE_ROT_LIMIT_ANGLE);
-	mRightEyeState.setRotation( tQh );
+	mLeftEyeState.setRotation( left_eye_rot );
+	mRightEyeState.setRotation( right_eye_rot );
 
 	return TRUE;
 }
diff --git a/indra/llcharacter/lljointstate.h b/indra/llcharacter/lljointstate.h
index 82a2b345b0cc307980f964ef528146ac79843646..c1c68ff065db2c73989f547d7aa748abbc6260a0 100644
--- a/indra/llcharacter/lljointstate.h
+++ b/indra/llcharacter/lljointstate.h
@@ -98,7 +98,7 @@ class LLJointState
 	void setScale( const LLVector3& scale )	{ llassert(mUsage & SCALE); mScale = scale; }
 
 	// get/set priority
-	const LLJoint::JointPriority getPriority()		{ return mPriority; }
+	LLJoint::JointPriority getPriority()		{ return mPriority; }
 	void setPriority( const LLJoint::JointPriority priority ) { mPriority = priority; }
 };
 
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index fad69fc6e9d4734ab3712a82866c1b3aad18891a..592a6bae2c003f4ea89da5a0f6145e05e1fdbdf7 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -340,7 +340,7 @@ BOOL LLMotionController::startMotion(const LLUUID &id, F32 start_offset)
 	{	
 		if (motion->isStopped()) // motion has been stopped
 		{
-			deactivateMotion(motion);
+			deactivateMotion(motion, false);
 		}
 		else if (mTime < motion->mSendStopTimestamp)	// motion is still active
 		{
@@ -376,7 +376,7 @@ BOOL LLMotionController::stopMotionLocally(const LLUUID &id, BOOL stop_immediate
 
 		if (stop_immediate)
 		{
-			deactivateMotion(motion);
+			deactivateMotion(motion, false);
 		}
 		return TRUE;
 	}
@@ -472,7 +472,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
 		{
 			if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration())
 			{
-				deactivateMotion(motionp);
+				deactivateMotion(motionp, false);
 			}
 			else if (motionp->isStopped() && mTime > motionp->getStopTime())
 			{
@@ -526,8 +526,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
 			{
 				if (motionp->isStopped() && mTime > motionp->getStopTime() + motionp->getEaseOutDuration())
 				{
-					posep->setWeight(0.f);
-					deactivateMotion(motionp);
+					deactivateMotion(motionp, true);
 				}
 				continue;
 			}
@@ -553,8 +552,7 @@ void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_ty
 			}
 			else
 			{
-				posep->setWeight(0.f);
-				deactivateMotion(motionp);
+				deactivateMotion(motionp, true);
 				continue;
 			}
 		}
@@ -802,8 +800,15 @@ BOOL LLMotionController::activateMotion(LLMotion *motion, F32 time)
 //-----------------------------------------------------------------------------
 // deactivateMotion()
 //-----------------------------------------------------------------------------
-BOOL LLMotionController::deactivateMotion(LLMotion *motion)
+BOOL LLMotionController::deactivateMotion(LLMotion *motion, bool remove_weight)
 {
+	if( remove_weight )
+	{
+		// immediately remove pose weighting instead of letting it time out
+		LLPose *posep = motion->getPose();
+		posep->setWeight(0.f);
+	}
+	
 	motion->deactivate();
 	mActiveMotions.remove(motion);
 
diff --git a/indra/llcharacter/llmotioncontroller.h b/indra/llcharacter/llmotioncontroller.h
index 15791b63188a15346db9e8432e466de50442aff4..19bab09a11f729203c00c9ba9c1479a4182da94c 100644
--- a/indra/llcharacter/llmotioncontroller.h
+++ b/indra/llcharacter/llmotioncontroller.h
@@ -162,7 +162,7 @@ class LLMotionController
 	void deleteAllMotions();
 	void addLoadedMotion(LLMotion *motion);
 	BOOL activateMotion(LLMotion *motion, F32 time);
-	BOOL deactivateMotion(LLMotion *motion);
+	BOOL deactivateMotion(LLMotion *motion, bool remove_weight);
 	void updateRegularMotions();
 	void updateAdditiveMotions();
 	void resetJointSignatures();
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index 2a8d03d431141454d1dfc2974d3f09a34eeed00e..d91cba4423976c15372407f9c9f785664a6bee0b 100644
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -88,7 +88,7 @@ class LLVisualParam
 	virtual void			stopAnimating(BOOL set_by_user);
 
 	// Interface methods
-	const S32				getID() 			{ return mID; }
+	S32						getID() 			{ return mID; }
 	void					setID(S32 id) 		{ llassert(!mInfo); mID = id; }
 	
 	const LLString&			getName() const 			{ return mInfo->mName; }
@@ -100,7 +100,7 @@ class LLVisualParam
 	void					setMaxDisplayName(const char* s) { mInfo->mMaxName = s; }
 	void					setMinDisplayName(const char* s) { mInfo->mMinName = s; }
 
-	const EVisualParamGroup	getGroup() 			{ return mInfo->mGroup; }
+	EVisualParamGroup		getGroup() 			{ return mInfo->mGroup; }
 	F32						getMinWeight() 		{ return mInfo->mMinWeight; }
 	F32						getMaxWeight() 		{ return mInfo->mMaxWeight; }
 	F32						getDefaultWeight() 	{ return mInfo->mDefaultWeight; }
diff --git a/indra/llcommon/llenum.h b/indra/llcommon/llenum.h
index 7443fe9d0f442845c0ae582c68c3efd43e267155..7d48b91005cd6695a1cd15ee9fe3bd7cb87665e0 100644
--- a/indra/llcommon/llenum.h
+++ b/indra/llcommon/llenum.h
@@ -32,7 +32,7 @@ class LLEnum
 		}
 	}
 
-	const U32 operator[](std::string str)
+	U32 operator[](std::string str)
 	{
 		std::map<const std::string, const U32>::iterator itor;
 		itor = mEnumMap.find(str);
diff --git a/indra/llcommon/metaclass.cpp b/indra/llcommon/metaclass.cpp
index 29ad20e6b6474eb7c7817d11156776afaa291d73..0cd5179f04b9c7fed9dff0aa1ea9165845c0296a 100644
--- a/indra/llcommon/metaclass.cpp
+++ b/indra/llcommon/metaclass.cpp
@@ -8,7 +8,10 @@
  * $License$
  */
 
+#include "linden_common.h" 
+
 #include "metaclass.h"
+
 #include "metaproperty.h"
 #include "reflective.h"
 
diff --git a/indra/llcommon/metaproperty.cpp b/indra/llcommon/metaproperty.cpp
index adcda0338949e65e806d8e4bbfd8fbc36e4acbc8..25a98f47f3c535436b0f9a48c400e2b92bb0c459 100644
--- a/indra/llcommon/metaproperty.cpp
+++ b/indra/llcommon/metaproperty.cpp
@@ -8,7 +8,10 @@
  * $License$
  */
 
+#include "linden_common.h" 
+
 #include "metaproperty.h"
+
 #include "metaclass.h"
 
 LLMetaProperty::LLMetaProperty(const std::string& name, const LLMetaClass& object_class) : 
diff --git a/indra/llcommon/reflective.cpp b/indra/llcommon/reflective.cpp
index 039a500575e0421e265811056950dacc35816696..d24aac41bc7dcd2c6be0b86d2e992310ba3a0c71 100644
--- a/indra/llcommon/reflective.cpp
+++ b/indra/llcommon/reflective.cpp
@@ -7,6 +7,8 @@
  * Copyright (c) 2006-$CurrentYear$, Linden Research, Inc.
  * $License$
  */
+
+#include "linden_common.h" 
  
 #include "reflective.h"
 
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index fe511851532b4bcee361f5d95c636bb13fd2b18a..d50c4f0d3bffe2c3046399baaebbc42a374e623a 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -278,7 +278,7 @@ class LLParcel
 	const char*		getMusicURL() const			{ return mMusicURL.c_str(); }
 	const char*		getMediaURL() const			{ return mMediaURL.c_str(); }
 	const LLUUID&	getMediaID() const			{ return mMediaID; }
-	const U8		getMediaAutoScale() const	{ return mMediaAutoScale; }
+	U8				getMediaAutoScale() const	{ return mMediaAutoScale; }
 	S32				getLocalID() const			{ return mLocalID; }
 	const LLUUID&	getOwnerID() const			{ return mOwnerID; }
 	const LLUUID&	getGroupID() const			{ return mGroupID; }
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index d78f9b630b2550fcf5572d56bfc4bf56489dc2c5..9bf76872726dd3d1d17b1ea67caa12be578cc9db 100644
--- a/indra/llinventory/llparcelflags.h
+++ b/indra/llinventory/llparcelflags.h
@@ -44,7 +44,7 @@ const U32 PF_ALLOW_GROUP_OBJECT_ENTRY	= 1 << 28;	// Only allow group (and owner)
 const U32 PF_ALLOW_VOICE_CHAT			= 1 << 29;	// Allow residents to use voice chat on this parcel
 const U32 PF_USE_ESTATE_VOICE_CHAN      = 1 << 30;
 
-const U32 PF_RESERVED			= 1 << 31;
+const U32 PF_RESERVED			= 1U << 31;
 
 // If any of these are true the parcel is restricting access in some maner.
 const U32 PF_USE_RESTRICTED_ACCESS = PF_USE_ACCESS_GROUP
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index a7d07bc7123ce23dc8fb2988ea55ffd69111c8fe..2db44d39d1f0a90dbc6d0002d0a100b7c321e432 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -822,7 +822,7 @@ class LLVolume : public LLRefCount
 	U8 getPathType() const									{ return mPathp->mParams.getCurveType(); }
 	S32	getNumFaces() const									{ return (S32)mProfilep->mFaces.size(); }
 	S32 getNumVolumeFaces() const							{ return mNumVolumeFaces; }
-	const F32 getDetail() const								{ return mDetail; }
+	F32 getDetail() const								{ return mDetail; }
 	const LLVolumeParams & getParams() const				{ return mParams; }
 	LLVolumeParams getCopyOfParams() const					{ return mParams; }
 	const LLProfile& getProfile() const						{ return *mProfilep; }
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index ef9c5d476940b800c29136932cb47f0bdb609bcd..13fdef38504b43bebc6e8c18f08cbbb9a2d3f879 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -73,7 +73,7 @@ class LLColor4
 		F32			magVec() const;				// Returns magnitude of LLColor4
 		F32			magVecSquared() const;		// Returns magnitude squared of LLColor4
 		F32			normVec();					// Normalizes and returns the magnitude of LLColor4
-		const BOOL		isOpaque() { return mV[VALPHA] == 1.f; }
+		BOOL		isOpaque() { return mV[VALPHA] == 1.f; }
 
 		F32 operator[](int idx) const { return mV[idx]; }
 		F32 &operator[](int idx) { return mV[idx]; }
diff --git a/indra/llmessage/llteleportflags.h b/indra/llmessage/llteleportflags.h
index 001d05d109b5eb5ba9f741736ca0fcfd1943494f..fd54814ce54afa06dc1c469aa749855db6763d15 100644
--- a/indra/llmessage/llteleportflags.h
+++ b/indra/llmessage/llteleportflags.h
@@ -24,6 +24,7 @@ const U32 TELEPORT_FLAGS_911 				= 1 << 10;
 const U32 TELEPORT_FLAGS_DISABLE_CANCEL		= 1 << 11;	// Used for llTeleportAgentHome()
 const U32 TELEPORT_FLAGS_VIA_REGION_ID  	= 1 << 12;
 const U32 TELEPORT_FLAGS_IS_FLYING			= 1 << 13;
+const U32 TELEPORT_FLAGS_SHOW_RESET_HOME	= 1 << 14;
 
 const U32 TELEPORT_FLAGS_MASK_VIA =   TELEPORT_FLAGS_VIA_LURE 
 									| TELEPORT_FLAGS_VIA_LANDMARK
diff --git a/indra/llmessage/machine.h b/indra/llmessage/machine.h
index b5efe717d8f06f42fdb4d7d3a55b74309f758fac..55e3aa0b3c8fc12f9bc5d0b9e296da150a0183c7 100644
--- a/indra/llmessage/machine.h
+++ b/indra/llmessage/machine.h
@@ -42,8 +42,8 @@ class LLMachine
 
 	// get functions
 	EMachineType	getMachineType()	const { return mMachineType; }
-	const U32		getMachineIP()		const { return mHost.getAddress(); }
-	const S32		getMachinePort()	const { return mHost.getPort(); }
+	U32				getMachineIP()		const { return mHost.getAddress(); }
+	S32				getMachinePort()	const { return mHost.getPort(); }
 	const LLHost	&getMachineHost()	const { return mHost; }
 	// The control port is the listen port of the parent process that
 	// launched this machine. 0 means none or not known.
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index 8cd7180f9a50358bf059a83006270095fb4599d1..2d3215f47c4075832c6eb73cb65dba0bab0a6ac5 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -271,8 +271,9 @@ S32 start_net(S32& socket_out, int& nPort)
 
 void end_net(S32& socket_out)
 {
-	if (socket_out < 0)
+	if (socket_out >= 0)
 	{
+		shutdown(socket_out, SD_BOTH);
 		closesocket(socket_out);
 	}
 	WSACleanup();
@@ -443,7 +444,7 @@ S32 start_net(S32& socket_out, int& nPort)
 
 void end_net(S32& socket_out)
 {
-	if (socket_out < 0)
+	if (socket_out >= 0)
 	{
 		close(socket_out);
 	}
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index ab1fc4f719e22300bcf1fcb3419eddf59ed61068..b5a46a41e6a4ef545f2b1e8f29d144bc35340e5d 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -320,14 +320,14 @@ class LLPrimitive : public LLXform
 	void 		setAcceleration(const F32 x, const F32 y, const F32 z)		{ mAcceleration.setVec(x,y,z); }
 #endif
 	
-	const LLPCode		getPCode() const			{ return mPrimitiveCode; }
+	LLPCode				getPCode() const			{ return mPrimitiveCode; }
 	const char *		getPCodeString() const		{ return pCodeToString(mPrimitiveCode); }
 	const LLVector3&	getAngularVelocity() const	{ return mAngularVelocity; }
 	const LLVector3&	getVelocity() const			{ return mVelocity; }
 	const LLVector3&	getAcceleration() const		{ return mAcceleration; }
-	const U8			getNumTEs() const			{ return mNumTEs; }
+	U8					getNumTEs() const			{ return mNumTEs; }
 
-	const U8			getMaterial() const			{ return mMaterial; }
+	U8					getMaterial() const			{ return mMaterial; }
 	
 	void				setVolumeType(const U8 code);
 	U8					getVolumeType();
diff --git a/indra/llprimitive/lltreeparams.h b/indra/llprimitive/lltreeparams.h
index fa55f584e355b8fd4620410bbd3bd17fb6e74cb4..957a42f3d332bebe2dcf65ebd70d80169b2ce64a 100644
--- a/indra/llprimitive/lltreeparams.h
+++ b/indra/llprimitive/lltreeparams.h
@@ -12,7 +12,7 @@
 /* for information about formulas associated with each type
  * check the Weber + Penn paper
  */
-typedef enum EShapeRatio { SR_CONICAL, SR_SPHERICAL, SR_HEMISPHERICAL, 
+enum EShapeRatio { SR_CONICAL, SR_SPHERICAL, SR_HEMISPHERICAL, 
 				SR_CYLINDRICAL, SR_TAPERED_CYLINDRICAL, SR_FLAME, 
 				SR_INVERSE_CONICAL, SR_TEND_FLAME, SR_ENVELOPE};
 
diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h
index 711d3b0ce8ab4530a79acb0657ee6a939e1dc01d..793f97dc64bf6877a598965586b7aaa002d1ce71 100644
--- a/indra/llui/llscrolllistctrl.h
+++ b/indra/llui/llscrolllistctrl.h
@@ -39,7 +39,7 @@ class LLScrollListCell
 	virtual S32				getHeight() const = 0;
 	virtual const LLString&	getText() const { return LLString::null; }
 	virtual const LLString&	getTextLower() const { return LLString::null; }
-	virtual const BOOL		getVisible() const { return TRUE; }
+	virtual BOOL			getVisible() const { return TRUE; }
 	virtual void			setWidth(S32 width) = 0;
 	virtual void			highlightText(S32 offset, S32 num_chars) {}
 	virtual BOOL			isText() = 0;
@@ -76,7 +76,7 @@ class LLScrollListText : public LLScrollListCell
 	virtual void	setWidth(S32 width)			{ mWidth = width; }
 	virtual S32		getHeight() const			{ return llround(mFont->getLineHeight()); }
 	virtual const LLString&		getText() const		{ return mText.getString(); }
-	virtual const BOOL			getVisible() const  { return mVisible; }
+	virtual BOOL	getVisible() const  { return mVisible; }
 	virtual void	highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;}
 	void			setText(const LLString& text);
 	virtual void	setColor(const LLColor4&);
diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp
index 48ff6afbd5388d733e2dc676a469bc29fb574137..f15383c6f75e9db5323016f39b2928e31466b321 100644
--- a/indra/llui/lltextbox.cpp
+++ b/indra/llui/lltextbox.cpp
@@ -419,6 +419,7 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
 		text,
 		font,
 		FALSE);
+		
 
 	LLFontGL::HAlign halign = LLView::selectFontHAlign(node);
 	text_box->setHAlign(halign);
@@ -430,6 +431,12 @@ LLView* LLTextBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *f
 	{
 		text_box->mFontStyle = LLFontGL::getStyleFromString(font_style);
 	}
+	
+	BOOL mouse_opaque;
+	if (node->getAttributeBOOL("mouse_opaque", mouse_opaque))
+	{
+		text_box->setMouseOpaque(mouse_opaque);
+	}	
 
 	if(node->hasAttribute("text_color"))
 	{
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index 1c2ac677dfba9c059df6a3dcaccff4457128f178..f07cbec3287fc83ff0cd9a5e356780555c43bb92 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -116,7 +116,7 @@ class LLUICtrl
 	{
 		/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const 
 		{
-			return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl * const>(view)->hasTabStop() && children.size() == 0, TRUE);
+			return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl *>(view)->hasTabStop() && children.size() == 0, TRUE);
 		}
 	};
 
@@ -124,7 +124,7 @@ class LLUICtrl
 	{
 		/*virtual*/ filterResult_t operator() (const LLView* const view, const viewList_t & children) const 
 		{
-			return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl * const>(view)->acceptsTextInput(), TRUE);
+			return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl *>(view)->acceptsTextInput(), TRUE);
 		}
 	};
 
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 1fab00b5244698623e62b8d9e99e671949d81e8c..dbc635830ba78fac34e9433cfd729e8908a0c69a 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -435,8 +435,8 @@ bool LLCompareByTabOrder::operator() (const LLView* const a, const LLView* const
 	if(b && b->isCtrl()) b_score--;
 	if(a_score == -2 && b_score == -2)
 	{
-		const LLUICtrl * const a_ctrl = static_cast<const LLUICtrl* const>(a);
-		const LLUICtrl * const b_ctrl = static_cast<const LLUICtrl* const>(b);
+		const LLUICtrl * const a_ctrl = static_cast<const LLUICtrl*>(a);
+		const LLUICtrl * const b_ctrl = static_cast<const LLUICtrl*>(b);
 		LLView::child_tab_order_const_iter_t a_found = mTabOrder.find(a_ctrl), b_found = mTabOrder.find(b_ctrl);
 		if(a_found != mTabOrder.end()) a_score--;
 		if(b_found != mTabOrder.end()) b_score--;
diff --git a/indra/llui/llviewquery.cpp b/indra/llui/llviewquery.cpp
index c7ae4245dd5afc135d96431377035801b6203e54..647e5e570720fd565efbaab5fc769b234464de6e 100644
--- a/indra/llui/llviewquery.cpp
+++ b/indra/llui/llviewquery.cpp
@@ -29,7 +29,7 @@ filterResult_t LLEnabledFilter::operator() (const LLView* const view, const view
 }
 filterResult_t LLTabStopFilter::operator() (const LLView* const view, const viewList_t & children) const 
 {
-	return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl* const>(view)->hasTabStop(),
+	return filterResult_t(view->isCtrl() && static_cast<const LLUICtrl*>(view)->hasTabStop(),
 						view->canFocusChildren());
 }
 
diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h
index 24fccb72c6011228c5163762ef5d034ef1853bac..56e66f2f9de4915c24b7a8b5ba3dcfe09bae0673 100644
--- a/indra/llxml/llxmlnode.h
+++ b/indra/llxml/llxmlnode.h
@@ -151,12 +151,12 @@ class LLXMLNode : public LLThreadSafeRefCount
 	BOOL getAttributeString(const LLString& name, LLString& value );
 
     const ValueType& getType() const { return mType; }
-    const U32 getLength() const { return mLength; }
-    const U32 getPrecision() const { return mPrecision; }
+    U32 getLength() const { return mLength; }
+    U32 getPrecision() const { return mPrecision; }
     const LLString& getValue() const { return mValue; }
 	LLString getTextContents() const;
     const LLStringTableEntry* getName() const { return mName; }
-	const BOOL hasName(LLString name) const { return mName == gStringTable.checkStringEntry(name); }
+	BOOL hasName(LLString name) const { return mName == gStringTable.checkStringEntry(name); }
     const LLString& getID() const { return mID; }
 
     U32 getChildCount() const;
diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index ed6e3bc1defb4ffa4201219ed59c6d5ae8c521ea..b5fdfc7a22751cd139385709703cf7c703048f93 100644
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
@@ -64,7 +64,7 @@ class LLScriptLibData
 	LLQuaternion	mQuat;
 	LLScriptLibData *mListp;
 
-	friend const bool operator<=(const LLScriptLibData &a, const LLScriptLibData &b)
+	friend bool operator<=(const LLScriptLibData &a, const LLScriptLibData &b)
 	{
 		if (a.mType == b.mType)
 		{
@@ -92,7 +92,7 @@ class LLScriptLibData
 		return TRUE;
 	}
 
-	friend const bool operator==(const LLScriptLibData &a, const LLScriptLibData &b)
+	friend bool operator==(const LLScriptLibData &a, const LLScriptLibData &b)
 	{
 		if (a.mType == b.mType)
 		{
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index a6d1deea1e873a3565b06c0d8ab234bef6f4c7a0..74fbe2c7f2cd0c8a0a9b9c6264cbbbd96fbd3eee 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -66,6 +66,9 @@ Intel 915GM						.*Intel.*915GM							0
 Intel 945G						.*Intel.*945G							0
 Intel 945GM						.*Intel.*945GM							0
 Intel 950						.*Intel.*950.*950						0
+Intel G965						.*Intel.*G965.*							0
+Intel GM965						.*Intel.*GM965.*						0
+Intel G33						.*Intel.*G33.*							0
 Intel Brookdale					.*Intel.*Brookdale.*					0
 Intel Montara					.*Intel.*Montara.*						0
 Intel Springdale				.*Intel.*Springdale.*					0
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f2cb9ea9caf3abe67a34137d7cb7fab71e237320..6713ea3eb2d4bb21dc4ce57e8d64ce7e8649bbcc 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1005,7 +1005,7 @@ const LLVector3 &LLAgent::getPositionAgent()
 //-----------------------------------------------------------------------------
 // getRegionsVisited()
 //-----------------------------------------------------------------------------
-const S32 LLAgent::getRegionsVisited() const
+S32 LLAgent::getRegionsVisited() const
 {
 	return mRegionsVisited.size();
 }
@@ -1013,7 +1013,7 @@ const S32 LLAgent::getRegionsVisited() const
 //-----------------------------------------------------------------------------
 // getDistanceTraveled()
 //-----------------------------------------------------------------------------
-const F64 LLAgent::getDistanceTraveled() const
+F64 LLAgent::getDistanceTraveled() const
 {
 	return mDistanceTraveled;
 }
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 2ee6634467be2345348523fbf70f6c2a6482acdb..c6d11b5ae555a9faa50f70911615b9b73ef1aab1 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -280,8 +280,8 @@ class LLAgent : public LLObservable
 
 	const LLVector3d	&getPositionGlobal();
 	const LLVector3		&getPositionAgent();
-	const S32			getRegionsVisited() const;
-	const F64			getDistanceTraveled() const;
+	S32					getRegionsVisited() const;
+	F64					getDistanceTraveled() const;
 
 	const LLVector3d	&getFocusGlobal() const	{ return mFocusGlobal; }
 	const LLVector3d	&getFocusTargetGlobal() const	{ return mFocusTargetGlobal; }
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index 782775d338ca7e3b36fedc5f601f0dd8553e88b5..48c58dbb4c3dc6981d65e9be711339fb2ab0793b 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -68,7 +68,7 @@ class LLDrawable : public LLRefCount
 
 	const LLMatrix4&      getWorldMatrix() const		{ return mXform.getWorldMatrix(); }
 	const LLMatrix4&	  getRenderMatrix() const		{ return isRoot() ? getWorldMatrix() : getParent()->getWorldMatrix(); }
-	const void			  setPosition(LLVector3 v) const { }
+	void				  setPosition(LLVector3 v) const { }
 	const LLVector3&	  getPosition() const			{ return mXform.getPosition(); }
 	const LLVector3&      getWorldPosition() const		{ return mXform.getPositionW(); }
 	const LLVector3		  getPositionAgent() const;
@@ -76,14 +76,14 @@ class LLDrawable : public LLRefCount
 	const LLVector3&	  getScale() const				{ return mCurrentScale; }
 	const LLQuaternion&   getWorldRotation() const		{ return mXform.getWorldRotation(); }
 	const LLQuaternion&   getRotation() const			{ return mXform.getRotation(); }
-	const F32             getIntensity() const			{ return llmin(mXform.getScale().mV[0], 4.f); }
-	const S32			  getLOD() const				{ return mVObjp ? mVObjp->getLOD() : 1; }
-	const F64			  getBinRadius() const			{ return mBinRadius; }
+	F32			          getIntensity() const			{ return llmin(mXform.getScale().mV[0], 4.f); }
+	S32					  getLOD() const				{ return mVObjp ? mVObjp->getLOD() : 1; }
+	F64					  getBinRadius() const			{ return mBinRadius; }
 	void  getMinMax(LLVector3& min,LLVector3& max) const { mXform.getMinMax(min,max); }
 	LLXformMatrix*		getXform() { return &mXform; }
 
-	const U32 			getState()           const { return mState; }
-	const BOOL          isState   (U32 bits) const { return ((mState & bits) != 0); }
+	U32					getState()           const { return mState; }
+	BOOL				isState   (U32 bits) const { return ((mState & bits) != 0); }
 	void                setState  (U32 bits)       { mState |= bits; }
 	void                clearState(U32 bits)       { mState &= ~bits; }
 
diff --git a/indra/newview/lldriverparam.h b/indra/newview/lldriverparam.h
index 8cdaa893c8195d79bef6a33fc23d2f44c174f7c4..ccd64ab6c85eac8a6d70343bc2f9b073c4733e50 100644
--- a/indra/newview/lldriverparam.h
+++ b/indra/newview/lldriverparam.h
@@ -84,7 +84,8 @@ class LLDriverParam : public LLViewerVisualParam
 	typedef std::vector<LLDrivenEntry> entry_list_t;
 	entry_list_t mDriven;
 	LLViewerVisualParam* mCurrentDistortionParam;
-	LLPointer<LLVOAvatar> mAvatarp;
+	// Backlink only; don't make this an LLPointer.
+	LLVOAvatar* mAvatarp;
 };
 
 #endif  // LL_LLDRIVERPARAM_H
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 14f3d4ad2b5994eb46a278b7246d376d7ab83358..33389e00e9ef649b7ad4a7b0a5297f5f255d0e7a 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -916,7 +916,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
 	BOOL is_static = mDrawablep->isStatic();
 	BOOL is_global = is_static;
 
-	if (-1 == index_offset)
+	if (index_offset == (U32) -1)
 	{
 		return TRUE;
 	}
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 63548b080af7c009144fca02e5811a8ca6313578..a304d52f137b6daebba12cd79285d0945b750633 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -55,11 +55,11 @@ class LLFace
 
 	const LLMatrix4& getWorldMatrix()	const	{ return mVObjp->getWorldMatrix(mXform); }
 	const LLMatrix4& getRenderMatrix() const;
-	const U32		getIndicesCount()	const	{ return mIndicesCount; };
-	const S32		getIndicesStart()	const	{ return mIndicesIndex; };
-	const S32		getGeomCount()		const	{ return mGeomCount; }		// vertex count for this face
-	const S32		getGeomIndex()		const	{ return mGeomIndex; }		// index into draw pool
-	const U32		getGeomStart()		const	{ return mGeomIndex; }		// index into draw pool
+	U32				getIndicesCount()	const	{ return mIndicesCount; };
+	S32				getIndicesStart()	const	{ return mIndicesIndex; };
+	S32				getGeomCount()		const	{ return mGeomCount; }		// vertex count for this face
+	S32				getGeomIndex()		const	{ return mGeomIndex; }		// index into draw pool
+	U32				getGeomStart()		const	{ return mGeomIndex; }		// index into draw pool
 	LLViewerImage*	getTexture()		const	{ return mTexture; }
 	void			setTexture(LLViewerImage* tex) { mTexture = tex; }
 	LLXformMatrix*	getXform()			const	{ return mXform; }
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 3107b062b7f440c42c0cc92a40e0c6be0c8b9c4d..2e9dba3af48e07ada55837f66a647be5d59d2b7c 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -606,7 +606,7 @@ void LLVolumeImplFlexible::onSetScale(const LLVector3& scale, BOOL damped)
 
 BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable)
 {
-	LLVOVolume *volume = (LLVOVolume*)mVO.get();
+	LLVOVolume *volume = (LLVOVolume*)mVO;
 
 	if (volume->mDrawable.isNull()) // Not sure why this is happening, but it is...
 	{
@@ -722,7 +722,7 @@ void LLVolumeImplFlexible::updateRelativeXform()
 {
 	LLQuaternion delta_rot;
 	LLVector3 delta_pos, delta_scale;
-	LLVOVolume* vo = (LLVOVolume*) mVO.get();
+	LLVOVolume* vo = (LLVOVolume*) mVO;
 
 	//matrix from local space to parent relative/global space
 	delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation();
diff --git a/indra/newview/llflexibleobject.h b/indra/newview/llflexibleobject.h
index 3a2660491311e98824307a6df8d3d67369800c45..c814f67b911187bc2b1fa07315d120e04b4c23d4 100644
--- a/indra/newview/llflexibleobject.h
+++ b/indra/newview/llflexibleobject.h
@@ -91,7 +91,8 @@ class LLVolumeImplFlexible : public LLVolumeInterface
 		//--------------------------------------
 		// private members
 		//--------------------------------------
-		LLPointer<LLViewerObject>	mVO;
+	    // Backlink only; don't make this an LLPointer.
+		LLViewerObject*				mVO;
 		LLTimer						mTimer;
 		LLVector3					mAnchorPosition;
 		LLVector3					mParentPosition;
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index 63b5262ced02503bda89ef218afce1ae3e6ac02e..ff7e8a41b7cf01a78904c7ea7215e2b372109ac0 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -62,9 +62,10 @@ LLFloaterAbout::LLFloaterAbout()
 
 	// Version string
 	LLString version = gSecondLife
-		+ llformat(" %d.%d.%d (%d) %s %s",
+		+ llformat(" %d.%d.%d (%d) %s %s (%s)",
 				   LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD,
-				   __DATE__, __TIME__);
+				   __DATE__, __TIME__,
+				   gChannelName.c_str());
 	support.append(version);
 	support.append("\n\n");
 
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp
index 75c68acb781609b3bdcd73ae3b65b9535123f844..f4769cc18ff9c6568868ced3359bbb08716092fd 100644
--- a/indra/newview/llfloaterchat.cpp
+++ b/indra/newview/llfloaterchat.cpp
@@ -167,22 +167,22 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
 	// could flash the chat button in the status bar here. JC
 	if (!gFloaterChat) return;
 
-	LLViewerTextEditor*	HistoryEditor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
-	LLViewerTextEditor*	HistoryEditorWithMute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
+	LLViewerTextEditor*	history_editor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
+	LLViewerTextEditor*	history_editor_with_mute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
 
-	HistoryEditor->setParseHTML(TRUE);
-	HistoryEditorWithMute->setParseHTML(TRUE);
+	history_editor->setParseHTML(TRUE);
+	history_editor_with_mute->setParseHTML(TRUE);
 	
 	if (!chat.mMuted)
 	{
-		add_timestamped_line(HistoryEditor, chat.mText, color);
-		add_timestamped_line(HistoryEditorWithMute, chat.mText, color);
+		add_timestamped_line(history_editor, chat.mText, color);
+		add_timestamped_line(history_editor_with_mute, chat.mText, color);
 	}
 	else
 	{
 		// desaturate muted chat
 		LLColor4 muted_color = lerp(color, LLColor4::grey, 0.5f);
-		add_timestamped_line(HistoryEditorWithMute, chat.mText, color);
+		add_timestamped_line(history_editor_with_mute, chat.mText, color);
 	}
 
 	if (!chat.mMuted
@@ -191,17 +191,19 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
 		&& chat.mFromID != gAgent.getID())
 	{
 			
-		LLComboBox*	ChatterCombo = LLUICtrlFactory::getComboBoxByName(gFloaterChat,"chatter combobox");
+		LLComboBox*	chatter_combo = LLUICtrlFactory::getComboBoxByName(gFloaterChat,"chatter combobox");
 		
-		if(!ChatterCombo)
-				return;
+		if(!chatter_combo)
+		{
+			return;
+		}
 
-		if (!ChatterCombo->setCurrentByID(chat.mFromID))
+		if (!chatter_combo->setCurrentByID(chat.mFromID))
 		{
 			// if we have too many items...
-			if (ChatterCombo->getItemCount() >= MAX_CHATTER_COUNT)
+			if (chatter_combo->getItemCount() >= MAX_CHATTER_COUNT)
 			{
-				ChatterCombo->remove(0);
+				chatter_combo->remove(0);
 			}
 			
 			LLMute mute(chat.mFromID, chat.mFromName);
@@ -214,8 +216,8 @@ void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
 				mute.mType = LLMute::AGENT;
 			}
 			LLString item = mute.getDisplayName();
-			ChatterCombo->add(item, chat.mFromID);
-			ChatterCombo->setCurrentByIndex(ChatterCombo->getItemCount() - 1);
+			chatter_combo->add(item, chat.mFromID);
+			chatter_combo->setCurrentByIndex(chatter_combo->getItemCount() - 1);
 			gFloaterChat->childSetEnabled("Mute resident",TRUE);
 		}
 	}
@@ -226,11 +228,11 @@ void LLFloaterChat::setHistoryCursorAndScrollToEnd()
 {
 	if (gFloaterChat)
 	{
-		LLViewerTextEditor*	HistoryEditor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
-		LLViewerTextEditor*	HistoryEditorWithMute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
+		LLViewerTextEditor*	history_editor = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor");
+		LLViewerTextEditor*	history_editor_with_mute = (LLViewerTextEditor*)gFloaterChat->getChildByName("Chat History Editor with mute");
 		
-		HistoryEditor->setCursorAndScrollToEnd();
-		HistoryEditorWithMute->setCursorAndScrollToEnd();
+		history_editor->setCursorAndScrollToEnd();
+		history_editor_with_mute->setCursorAndScrollToEnd();
 	}
 }
 
@@ -259,10 +261,10 @@ void LLFloaterChat::onClickMute(void *data)
 {
 	LLFloaterChat* self = (LLFloaterChat*)data;
 
-	LLComboBox*	ChatterCombo = LLUICtrlFactory::getComboBoxByName(self,"chatter combobox");
+	LLComboBox*	chatter_combo = LLUICtrlFactory::getComboBoxByName(self,"chatter combobox");
 
-	const LLString& name = ChatterCombo->getSimple();
-	LLUUID id = ChatterCombo->getCurrentID();
+	const LLString& name = chatter_combo->getSimple();
+	LLUUID id = chatter_combo->getCurrentID();
 
 	if (name.empty()) return;
 
@@ -308,24 +310,24 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
 
 	//LLCheckBoxCtrl*	
 	BOOL show_mute = LLUICtrlFactory::getCheckBoxByName(floater,"show mutes")->get();
-	LLViewerTextEditor*	HistoryEditor = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor");
-	LLViewerTextEditor*	HistoryEditorWithMute = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor with mute");
+	LLViewerTextEditor*	history_editor = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor");
+	LLViewerTextEditor*	history_editor_with_mute = (LLViewerTextEditor*)floater->getChildByName("Chat History Editor with mute");
 
-	if (!HistoryEditor || !HistoryEditorWithMute)
+	if (!history_editor || !history_editor_with_mute)
 		return;
 
 	//BOOL show_mute = floater->mShowMuteCheckBox->get();
 	if (show_mute)
 	{
-		HistoryEditor->setVisible(FALSE);
-		HistoryEditorWithMute->setVisible(TRUE);
-		HistoryEditorWithMute->setCursorAndScrollToEnd();
+		history_editor->setVisible(FALSE);
+		history_editor_with_mute->setVisible(TRUE);
+		history_editor_with_mute->setCursorAndScrollToEnd();
 	}
 	else
 	{
-		HistoryEditor->setVisible(TRUE);
-		HistoryEditorWithMute->setVisible(FALSE);
-		HistoryEditor->setCursorAndScrollToEnd();
+		history_editor->setVisible(TRUE);
+		history_editor_with_mute->setVisible(FALSE);
+		history_editor->setCursorAndScrollToEnd();
 	}
 }
 
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index b1143c4e7b7b2349771fe36566a8a500b1198860..1e9acc96c1fc99ded62a7b9d45e23a954b95d627 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -172,13 +172,11 @@ void LLFloaterLand::show()
 	// (and hence we have the local id).
 	// gParcelMgr->sendParcelAccessListRequest(AL_ACCESS | AL_BAN | AL_RENTER);
 
-	// If we've already got the parcel data, fill the
-	// floater with it.
 	sInstance->mParcel = gParcelMgr->getFloatingParcelSelection();
-	if (sInstance->mParcel->getParcel())
-	{
-		sInstance->refresh();
-	}
+	
+	// Refresh even if not over a region so we don't get an
+	// uninitialized dialog. The dialog is 0-region aware.
+	sInstance->refresh();
 }
 
 //static
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index dc34291f247b53da684f4861bbfec3e35279f0cf..1c287a187ad6b6a41fd6d1255803e3855f227392 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -30,6 +30,7 @@
 #include "llcombobox.h"
 #include "llfilepicker.h"
 #include "llfloatergodtools.h"	// for send_sim_wide_deletes()
+#include "llfloatertopobjects.h" // added to fix SL-32336
 #include "llfloatergroups.h"
 #include "llfloatertelehub.h"
 #include "lllineeditor.h"
@@ -865,6 +866,8 @@ void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
 	strings_t strings;
 	strings.push_back("1");	// one physics step
 	LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
+	LLFloaterTopObjects::show();
+	LLFloaterTopObjects::clearList();
 	self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
 }
 
@@ -875,6 +878,8 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
 	strings_t strings;
 	strings.push_back("6");	// top 5 scripts
 	LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
+	LLFloaterTopObjects::show();
+	LLFloaterTopObjects::clearList();
 	self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
 }
 
diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp
index 90490f6f9b969681e8821a2186f0210fa7772857..d850c6812f15e02f3abe64f26d2bbbe36e8f1cc3 100644
--- a/indra/newview/llfloatertopobjects.cpp
+++ b/indra/newview/llfloatertopobjects.cpp
@@ -350,19 +350,22 @@ void LLFloaterTopObjects::onDisableSelected(void* data)
 	sInstance->doToObjects(ACTION_DISABLE, false);
 }
 
+//static
 void LLFloaterTopObjects::clearList()
 {
-	LLCtrlListInterface *list = childGetListInterface("objects_list");
+	LLCtrlListInterface *list = sInstance->childGetListInterface("objects_list");
 	
 	if (list) 
 	{
 		list->operateOnAll(LLCtrlListInterface::OP_DELETE);
 	}
 
-	mObjectListData.clear();
-	mObjectListIDs.clear();
+	sInstance->mObjectListData.clear();
+	sInstance->mObjectListIDs.clear();
+	sInstance->mtotalScore = 0.f;
 }
 
+//static
 void LLFloaterTopObjects::onRefresh(void* data)
 {
 	U32 mode = STAT_REPORT_TOP_SCRIPTS;
@@ -377,8 +380,6 @@ void LLFloaterTopObjects::onRefresh(void* data)
 		sInstance->clearList();
 	}
 
-	sInstance->mtotalScore = 0.f;
-
 	LLMessageSystem *msg = gMessageSystem;
 	msg->newMessageFast(_PREHASH_LandStatRequest);
 	msg->nextBlockFast(_PREHASH_AgentData);
diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h
index 071e0bc5cdc59588807ab576a00992216a34c794..e27955c324c56e03d641b82a7c9356cec7ee7072 100644
--- a/indra/newview/llfloatertopobjects.h
+++ b/indra/newview/llfloatertopobjects.h
@@ -24,7 +24,7 @@ class LLFloaterTopObjects : public LLFloater
 	static void handle_land_reply(LLMessageSystem* msg, void** data);
 	void handleReply(LLMessageSystem* msg, void** data);
 	
-	void clearList();
+	static void clearList();
 	void updateSelectionInfo();
 	virtual BOOL postBuild();
 
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 5348308a83d3e694a1160cdbc7a7b789e137e1f0..28ea0025836c8a39ac99ef59b49742d2b27286f5 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -78,7 +78,7 @@ class LLFloaterIMPanel : public LLFloater
 
 	const LLUUID& getSessionID() const { return mSessionUUID; }
 	const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; }
-	const EInstantMessage getDialogType() const { return mDialog; }
+	EInstantMessage getDialogType() const { return mDialog; }
 
 	void sessionInitReplyReceived(const LLUUID& im_session_id);
 
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp
index 724ef8a8476b27dfdcda9ff05b3c78d828fcd652..7db88b60a2cc274a410943e1001d886acbcba377 100644
--- a/indra/newview/llpanelcontents.cpp
+++ b/indra/newview/llpanelcontents.cpp
@@ -36,7 +36,6 @@
 #include "llviewerobject.h"
 #include "llviewerregion.h"
 #include "llresmgr.h"
-#include "lltexturetable.h"
 #include "llselectmgr.h"
 #include "llpreviewscript.h"
 #include "lltool.h"
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 158421f7a0bf8292e6339145efa8b01556373275..a83b460e7104764f8ae1f0f3bed5098aec55e82f 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -31,7 +31,6 @@
 #include "lltextbox.h"
 #include "lltexturectrl.h"
 #include "lltextureentry.h"
-#include "lltexturetable.h"
 #include "lltooldraganddrop.h"
 #include "llui.h"
 #include "llviewercontrol.h"
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 58a596979292d4c06fab3825b379c835dd7435a3..c3d4551032fbbf4dc61e3e88b28cd05e5a7ce462 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -200,7 +200,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 		text->setClickedCallback(onClickVersion);
 		text->setCallbackUserData(this);
 
-		// HACK
+		// HACK to move to the lower-right of the window
+		// replace/remove this logic when we have dynamic layouts
 		S32 right = getRect().mRight;
 		LLRect r = text->getRect();
 		const S32 PAD = 2;
@@ -209,6 +210,31 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
 		text->setRect(r);
 	}
 
+	LLTextBox* channel_text = LLUICtrlFactory::getTextBoxByName(this, "channel_text");
+	if (channel_text)
+	{
+		channel_text->setText(gChannelName);
+		channel_text->setClickedCallback(onClickVersion);
+		channel_text->setCallbackUserData(this);
+
+		// HACK to move to the right of the window, above the version string,
+		// replace/remove this logic when we have dynamic layouts
+		S32 right = getRect().mRight;
+		LLRect r = channel_text->getRect();
+		const S32 PAD = 2;
+		S32 version_string_top = r.mTop;
+		if(text)
+		{
+			version_string_top = text->getRect().mTop;
+		}
+		r.setOriginAndSize( 
+			right - r.getWidth() - PAD,
+			version_string_top, 
+			r.getWidth(), 
+			r.getHeight());
+		channel_text->setRect(r);
+	}
+
 	// get the web browser control
 	#if LL_LIBXUL_ENABLED
 	LLWebBrowserCtrl* web_browser = LLUICtrlFactory::getWebBrowserCtrlByName(this, "login_html");
diff --git a/indra/newview/llpolymesh.h b/indra/newview/llpolymesh.h
index 577f5c7dfbdf93d3026773d0a7188ccd33b85a62..1d09d6a1d367d818836321a86a9b9942d78569b0 100644
--- a/indra/newview/llpolymesh.h
+++ b/indra/newview/llpolymesh.h
@@ -340,7 +340,8 @@ class LLPolyMesh
 	typedef LLAssocList<std::string, LLPolyMeshSharedData*> LLPolyMeshSharedDataTable; 
 	static LLPolyMeshSharedDataTable sGlobalSharedMeshList;
 
-	LLPointer<LLVOAvatar> mAvatarp;
+	// Backlink only; don't make this an LLPointer.
+	LLVOAvatar* mAvatarp;
 };
 
 //-----------------------------------------------------------------------------
@@ -406,7 +407,8 @@ class LLPolySkeletalDistortion : public LLViewerVisualParam
 	joint_vec_map_t mJointScales;
 	joint_vec_map_t mJointOffsets;
 	LLVector3	mDefaultVec;
-	LLPointer<LLVOAvatar> mAvatar;
+	// Backlink only; don't make this an LLPointer.
+	LLVOAvatar *mAvatar;
 };
 
 #endif // LL_LLPOLYMESH_H
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 3bfe913ab4bcdbc9002831da37c59b584fb09456..d91bb7d5cf91ec70dc91bd7cb44bb7b4e6da8620 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -104,7 +104,7 @@ BOOL LLProgressView::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent)
 		// Suck up all keystokes except CTRL-Q.
 		if( ('Q' == key) && (MASK_CONTROL == mask) )
 		{
-			app_request_quit();
+			app_user_quit();
 		}
 		return TRUE;
 	}
diff --git a/indra/newview/llsrv.cpp b/indra/newview/llsrv.cpp
index cd05d9c10732336288d760a389f65407219727c3..7669eb994a9741e0a032c952cdbb5444fcdf4db8 100644
--- a/indra/newview/llsrv.cpp
+++ b/indra/newview/llsrv.cpp
@@ -53,49 +53,37 @@ vector<LLSRVRecord> LLSRV::query(const string& name)
 
 #include <netdb.h>
 
-vector<LLSRVRecord> LLSRV::query(const string& queryName)
+#ifdef HOMEGROWN_RESPONSE_PARSER
+
+// We ought to be using libresolv's ns_initparse and ns_parserr to
+// parse the result of our query.  However, libresolv isn't packaged
+// correctly on Linux (as of BIND 9), so neither of these functions is
+// available without statically linking against libresolv.  Ugh!  This
+// fallback function is available if we need to parse the response
+// ourselves without relying too much on libresolv.  It is NOT THE
+// DEFAULT.
+
+vector<LLSRVRecord> LLSRV::parseResponse(const unsigned char *response,
+										 int resp_len)
 {
-	unsigned char response[16384];
 	vector<LLSRVRecord> recs;
-	char name[1024];
-	int len;
-	
-	len = res_query(queryName.c_str(), ns_c_in, ns_t_srv, response,
-					sizeof(response));
-
-	if (len == -1)
-	{
-		llinfos << "Query failed for " << queryName << llendl;
-		return recs;
-	}
-	else if (len > (int) sizeof(response))
-	{
-		llinfos << "Response too big for " << queryName
-				<< " (capacity " << sizeof(response)
-				<< ", response " << len << ")" << llendl;
-		return recs;
-	}
-
-    // We "should" be using libresolv's ns_initparse and ns_parserr to
-    // parse the result of our query.  However, libresolv isn't
-    // packaged correctly on Linux (as of BIND 9), so neither of these
-    // functions is available without statically linking against
-    // libresolv.  Ugh!  So we parse the response ourselves.
 
 	const unsigned char *pos = response + sizeof(HEADER);
-	const unsigned char *end = response + len;
+	const unsigned char *end = response + resp_len;
 	const HEADER *hdr = (const HEADER *) response;
+	char name[1024];
 
 	// Skip over the query embedded in the response.
 
 	for (int q = ntohs(hdr->qdcount); q > 0; --q)
 	{
-		len = dn_expand(response, end, pos, name, sizeof(name));
+		int len = dn_expand(response, end, pos, name, sizeof(name));
 
 		if (len == -1)
 		{
-			llinfos << "Could not expand queried name in RR response" << llendl;
-			return recs;
+			llinfos << "Could not expand queried name in RR response"
+					<< llendl;
+			goto bail;
 		}
 		
 		pos += len + NS_QFIXEDSZ;
@@ -105,11 +93,12 @@ vector<LLSRVRecord> LLSRV::query(const string& queryName)
 	{
 		static const ns_rr *rr;
 
-		len = dn_expand(response, end, pos, name, sizeof(name) - 1);
+		int len = dn_expand(response, end, pos, name, sizeof(name) - 1);
 		if (len == -1)
 		{
-			llinfos << "Could not expand response name in RR response" << llendl;
-			return recs;
+			llinfos << "Could not expand response name in RR response"
+					<< llendl;
+			goto bail;
 		}
 
 		// Skip over the resource name and headers we don't care about.
@@ -130,7 +119,7 @@ vector<LLSRVRecord> LLSRV::query(const string& queryName)
 		if (len == -1)
 		{
 			llinfos << "Could not expand name in RR response" << llendl;
-			return recs;
+			goto bail;
 		}
 
 		recs.push_back(LLSRVRecord(prio, weight, name, port));
@@ -138,12 +127,177 @@ vector<LLSRVRecord> LLSRV::query(const string& queryName)
 
 	// There are likely to be more records in the response, but we
 	// don't care about those, at least for now.
+bail:
+	return reorder(recs);
+}
 
-	return recs;
+#else // HOMEGROWN_RESPONSE_PARSER
+
+// This version of the response parser is the one to use if libresolv
+// is available and behaving itself.
+
+vector<LLSRVRecord> LLSRV::parseResponse(const unsigned char *response,
+										 int resp_len)
+{
+	vector<LLSRVRecord> recs;
+	ns_msg hdr;
+
+	if (ns_initparse(response, resp_len, &hdr))
+	{
+		llinfos << "Could not parse response" << llendl;
+		goto bail;
+	}
+	
+	for (int i = 0; i < ns_msg_count(hdr, ns_s_an); i++)
+	{
+		ns_rr rr;
+		
+		if (ns_parserr(&hdr, ns_s_an, i, &rr))
+		{
+			llinfos << "Could not parse RR" << llendl;
+			goto bail;
+		}
+
+		if (ns_rr_type(rr) != ns_t_srv)
+		{
+			continue;
+		}
+
+		const unsigned char *pos = ns_rr_rdata(rr);
+		U16 prio, weight, port;
+		char name[1024];
+		int ret;
+		
+		NS_GET16(prio, pos);
+		NS_GET16(weight, pos);
+		NS_GET16(port, pos);
+		
+		ret = dn_expand(ns_msg_base(hdr), ns_msg_end(hdr), pos,
+						name, sizeof(name));
+
+		if (ret == -1)
+		{
+			llinfos << "Could not decompress name" << llendl;
+			goto bail;
+		}
+
+		recs.push_back(LLSRVRecord(prio, weight, name, port));
+	}
+	
+bail:
+	return reorder(recs);
+}
+
+#endif // HOMEGROWN_RESPONSE_PARSER
+
+vector<LLSRVRecord> LLSRV::query(const string& queryName)
+{
+	unsigned char response[16384];
+	vector<LLSRVRecord> recs;
+	int len;
+	
+	len = res_query(queryName.c_str(), ns_c_in, ns_t_srv, response,
+					sizeof(response));
+
+	if (len == -1)
+	{
+		llinfos << "Query failed for " << queryName << llendl;
+		goto bail;
+	}
+	else if (len > (int) sizeof(response))
+	{
+		llinfos << "Response too big for " << queryName
+				<< " (capacity " << sizeof(response)
+				<< ", response " << len << ")" << llendl;
+		goto bail;
+	}
+
+	recs = parseResponse(response, len);
+bail:
+	return reorder(recs);
 }
 
 #endif // LL_WINDOWS
 
+// Implement the algorithm specified in RFC 2782 for dealing with RRs
+// of differing priorities and weights.
+vector<LLSRVRecord> LLSRV::reorder(vector<LLSRVRecord>& recs)
+{
+	typedef list<const LLSRVRecord *> reclist_t;
+	typedef map<U16, reclist_t> bucket_t;
+	vector<LLSRVRecord> newRecs;
+	bucket_t buckets;
+
+	// Don't rely on the DNS server to shuffle responses.
+	
+	random_shuffle(recs.begin(), recs.end());
+
+	for (vector<LLSRVRecord>::const_iterator iter = recs.begin();
+		 iter != recs.end(); ++iter)
+	{
+		buckets[iter->priority()].push_back(&*iter);
+	}
+	
+	// Priorities take precedence over weights.
+
+	for (bucket_t::iterator iter = buckets.begin();
+		 iter != buckets.end(); ++iter)
+	{
+		reclist_t& myPrio = iter->second;
+		reclist_t r;
+
+		// RRs with weight zero go to the front of the intermediate
+		// list, so they'll have little chance of being chosen.
+		// Larger weights have a higher likelihood of selection.
+
+		for (reclist_t::iterator i = myPrio.begin(); i != myPrio.end(); )
+		{
+			if ((*i)->weight() == 0)
+			{
+				r.push_back(*i);
+				i = myPrio.erase(i);
+			} else {
+				++i;
+			}
+		}
+
+		r.insert(r.end(), myPrio.begin(), myPrio.end());
+		
+		while (!r.empty())
+		{
+			U32 total = 0;
+
+			for (reclist_t::const_iterator i = r.begin(); i != r.end(); ++i)
+			{
+				total += (*i)->weight();
+			}
+
+			U32 target = total > 1 ? (rand() % total) : 0;
+			U32 partial = 0;
+			
+			for (reclist_t::iterator i = r.begin(); i != r.end(); )
+			{
+				partial += (*i)->weight();
+				if (partial >= target)
+				{
+					newRecs.push_back(**i);
+					i = r.erase(i);
+				} else {
+					++i;
+				}
+			}
+		}
+	}
+	
+	// Order RRs by lowest numeric priority.  The stable sort
+	// preserves the weight choices we made above.
+
+	stable_sort(newRecs.begin(), newRecs.end(),
+				LLSRVRecord::ComparePriorityLowest());
+
+	return newRecs;
+}
+
 vector<string> LLSRV::rewriteURI(const string& uriStr)
 {
 	LLURI uri(uriStr);
@@ -166,6 +320,14 @@ vector<string> LLSRV::rewriteURI(const string& uriStr)
 		size_t i;
 
 		llinfos << "Got " << srvs.size() << " results" << llendl;
+		for (iter = srvs.begin(); iter != srvs.end(); ++iter)
+		{
+			lldebugs << "host " << iter->target() << ':' << iter->port()
+					 << " prio " << iter->priority()
+					 << " weight " << iter->weight()
+					 << llendl;
+		}
+
 		if (srvs.size() > maxSrvs)
 		{
 			llinfos << "Clamping to " << maxSrvs << llendl;
diff --git a/indra/newview/llsrv.h b/indra/newview/llsrv.h
index 14a64e639e454297084d92ac173ae7b168365cc4..fde4f3915dd31e7a6956339965afda9427ae904c 100644
--- a/indra/newview/llsrv.h
+++ b/indra/newview/llsrv.h
@@ -21,6 +21,7 @@ class LLSRVRecord
 	std::string mTarget;
 	U16 mPort;
 
+public:
 	LLSRVRecord(U16 priority, U16 weight, const std::string& target,
 				U16 port) :
 		mPriority(priority),
@@ -28,16 +29,30 @@ class LLSRVRecord
 		mTarget(target),
 		mPort(port) {
 	}
-	
-public:
+
 	U16 priority() const { return mPriority; }
 	U16 weight() const { return mWeight; }
 	const std::string& target() const { return mTarget; }
 	U16 port() const { return mPort; }
+
+	struct ComparePriorityLowest
+	{
+		bool operator()(const LLSRVRecord& lhs, const LLSRVRecord& rhs)
+		{
+			return lhs.mPriority < rhs.mPriority;
+		}
+	};
 };
 	
 class LLSRV
 {
+protected:
+#ifndef LL_WINDOWS
+	static std::vector<LLSRVRecord> parseResponse(const unsigned char *response,
+												  int resp_len);
+#endif
+	static std::vector<LLSRVRecord> reorder(std::vector<LLSRVRecord>& recs);
+
 public:
 	static std::vector<LLSRVRecord> query(const std::string& name);
 	static std::vector<std::string> rewriteURI(const std::string& uri);
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 72aca1999ead2f342c71658076d82baf0009fa5c..bc27d9af9f8d0aec7fec86a9c9b496b2cdb927f1 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -62,6 +62,7 @@ LLStatusBar *gStatusBar = NULL;
 S32 STATUS_BAR_HEIGHT = 0;
 extern S32 MENU_BAR_HEIGHT;
 
+
 // TODO: these values ought to be in the XML too
 const S32 MENU_PARCEL_SPACING = 1;	// Distance from right of menu item to parcel information
 const S32 SIM_STAT_WIDTH = 8;
@@ -75,6 +76,10 @@ const F32 ICON_FLASH_FREQUENCY	= 2.f;
 const S32 GRAPHIC_FUDGE = 4;
 const S32 TEXT_HEIGHT = 18;
 
+std::vector<std::string> LLStatusBar::sDays;
+std::vector<std::string> LLStatusBar::sMonths;
+const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000;
+
 LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
 :	LLPanel(name, LLRect(), FALSE),		// not mouse opaque
 	mBalance(0),
@@ -86,6 +91,10 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
 	mMouseOpaque = FALSE;
 	setIsChrome(TRUE);
 
+	// size of day of the weeks and year
+	sDays.reserve(7);
+	sMonths.reserve(12);
+
 	mBalanceTimer = new LLFrameTimer();
 	mHealthTimer = new LLFrameTimer();
 
@@ -94,6 +103,9 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
 	// status bar can never get a tab
 	setFocusRoot(FALSE);
 
+	// build date necessary data (must do after panel built)
+	setupDate();
+
 	mBtnScriptOut = LLUICtrlFactory::getButtonByName( this, "scriptout" );
 	mBtnHealth = LLUICtrlFactory::getButtonByName( this, "health" );
 	mBtnFly = LLUICtrlFactory::getButtonByName( this, "fly" );
@@ -108,7 +120,7 @@ LLStatusBar::LLStatusBar(const std::string& name, const LLRect& rect)
 
 	mTextHealth = LLUICtrlFactory::getTextBoxByName( this, "HealthText" );
 	mTextTime = LLUICtrlFactory::getTextBoxByName( this, "TimeText" );
-
+	
 	S32 x = mRect.getWidth() - 2;
 	S32 y = 0;
 	LLRect r;
@@ -245,6 +257,14 @@ void LLStatusBar::refresh()
 	  << " " << am_pm << " " << tz;
 	mTextTime->setText(t.str().c_str());
 
+	// Year starts at 1900, set the tooltip to have the date
+	std::ostringstream date;
+	date	<< sDays[internal_time->tm_wday] << ", "
+			<< std::setfill('0') << std::setw(2) << internal_time->tm_mday << " "
+			<< sMonths[internal_time->tm_mon] << " "
+			<< internal_time->tm_year + 1900;
+	mTextTime->setToolTip(date.str().c_str());
+
 	LLRect r;
 	const S32 MENU_RIGHT = gMenuBarView->getRightmostMenuEdge();
 	S32 x = MENU_RIGHT + MENU_PARCEL_SPACING;
@@ -624,6 +644,69 @@ void LLStatusBar::onClickBuyLand(void*)
 	gParcelMgr->startBuyLand();
 }
 
+// sets the static variables necessary for the date
+void LLStatusBar::setupDate()
+{
+	// fill the day array with what's in the xui
+	LLString day_list = childGetText("StatBarDaysOfWeek");
+	size_t length = day_list.size();
+	
+	// quick input check
+	if(length < MAX_DATE_STRING_LENGTH)
+	{
+		// tokenize it and put it in the array
+		LLString cur_word;
+		for(size_t i = 0; i < length; ++i)
+		{
+			if(day_list[i] == ':')
+			{
+				sDays.push_back(cur_word);
+				cur_word.clear();
+			}
+			else
+			{
+				cur_word.append(1, day_list.c_str()[i]);
+			}
+		}
+		sDays.push_back(cur_word);
+	}
+	
+	// fill the day array with what's in the xui	
+	LLString month_list = childGetText( "StatBarMonthsOfYear" );
+	length = month_list.size();
+	
+	// quick input check
+	if(length < MAX_DATE_STRING_LENGTH)
+	{
+		// tokenize it and put it in the array
+		LLString cur_word;
+		for(size_t i = 0; i < length; ++i)
+		{
+			if(month_list[i] == ':')
+			{
+				sMonths.push_back(cur_word);
+				cur_word.clear();
+			}
+			else
+			{
+				cur_word.append(1, month_list.c_str()[i]);
+			}
+		}
+		sMonths.push_back(cur_word);
+	}
+	
+	// make sure we have at least 7 days and 12 months
+	if(sDays.size() < 7)
+	{
+		sDays.resize(7);
+	}
+	
+	if(sMonths.size() < 12)
+	{
+		sMonths.resize(12);
+	}
+}
+
 BOOL can_afford_transaction(S32 cost)
 {
 	return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost)));
diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h
index c44c7acffec7f8b585a5dd5d86e9ee83180428a3..0182cae3b72896cf27b854f09bd3c5c7a208a25c 100644
--- a/indra/newview/llstatusbar.h
+++ b/indra/newview/llstatusbar.h
@@ -73,6 +73,9 @@ class LLStatusBar
 	static void onClickScripts(void*);
 	static void onClickBuyLand(void*);
 	static void onClickScriptDebug(void*);
+	
+	// simple method to setup the part that holds the date
+	void setupDate();
 
 protected:
 	LLTextBox	*mTextBalance;
@@ -101,6 +104,10 @@ class LLStatusBar
 	S32				mSquareMetersCommitted;
 	LLFrameTimer*	mBalanceTimer;
 	LLFrameTimer*	mHealthTimer;
+	
+	static std::vector<std::string> sDays;
+	static std::vector<std::string> sMonths;
+	static const U32 LLStatusBar::MAX_DATE_STRING_LENGTH;
 };
 
 // *HACK: Status bar owns your cached money balance. JC
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 11a95d4837079e90a10bc2ccc03bb1c82effa071..178c83f61e4aaec4f8e9e42b7b5cdd3bf8f73719 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -2294,7 +2294,7 @@ LLColor4 LLTexParamColor::getNetColor()
 {
 	llassert( getInfo()->mNumColors >= 1 );
 
-	F32 effective_weight = ( mAvatar.notNull() && (mAvatar->getSex() & getSex()) ) ? mCurWeight : getDefaultWeight();
+	F32 effective_weight = ( mAvatar && (mAvatar->getSex() & getSex()) ) ? mCurWeight : getDefaultWeight();
 
 	S32 index_last = getInfo()->mNumColors - 1;
 	F32 scaled_weight = effective_weight * index_last;
diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h
index 1dd0f0b6570359978adc219c7c4eb42c23695c58..d60d4eab6c30316f1cd4f85d7332b53dc2493116 100644
--- a/indra/newview/lltexlayer.h
+++ b/indra/newview/lltexlayer.h
@@ -266,7 +266,8 @@ class LLTexLayerSet
 	typedef std::vector<LLTexLayer *> layer_list_t;
 	layer_list_t			mLayerList;
 	LLTexLayerSetBuffer*	mComposite;
-	LLPointer<LLVOAvatar>	mAvatar;
+	// Backlink only; don't make this an LLPointer.
+	LLVOAvatar*				mAvatar;
 	BOOL					mUpdatesEnabled;
 	BOOL					mHasBump;
 
@@ -423,7 +424,7 @@ class LLTexGlobalColor
 protected:
 	typedef std::vector<LLTexParamColor *> param_list_t;
 	param_list_t			mParamList;
-	LLPointer<LLVOAvatar>	mAvatar;
+	LLVOAvatar*				mAvatar;  // just backlink, don't LLPointer 
 
 	LLTexGlobalColorInfo	*mInfo;
 };
@@ -469,7 +470,7 @@ class LLTexParamColor : public LLViewerVisualParam
 	LLVector3				mAvgDistortionVec;
 	LLTexGlobalColor*		mTexGlobalColor;	// either has mTexGlobalColor or mTexLayer as its parent
 	LLTexLayer*				mTexLayer;
-	LLPointer<LLVOAvatar>	mAvatar;			// redundant, but simplifies the code
+	LLVOAvatar*				mAvatar;			// redundant, but simplifies the code (don't LLPointer)
 };
 
 //-----------------------------------------------------------------------------
@@ -549,7 +550,7 @@ class LLBakedUploadData
 	~LLBakedUploadData() {}
 
 	LLUUID					mID;
-	LLPointer<LLVOAvatar>	mAvatar;
+	LLVOAvatar*				mAvatar;	 // just backlink, don't LLPointer 
 	LLTexLayerSetBuffer*	mLayerSetBuffer;
 	LLUUID					mWearableAssets[WT_COUNT];
 };
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 683f8b56cf7ed694c8344142fe44218dc3182831..d51fffb541b1b2b06d01be8afbd9ab0a7d6db848 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -23,7 +23,6 @@
 #include "lltexlayer.h"
 #include "lltexturecache.h"
 #include "lltexturefetch.h"
-#include "lltexturetable.h"
 #include "llviewerobject.h"
 #include "llviewerimage.h"
 #include "llviewerimagelist.h"
@@ -163,9 +162,6 @@ void LLTextureBar::draw()
 
 	LLGLSUIDefault gls_ui;
 	
-	// Get the name or UUID of the image.
-	gTextureTable.getName(mImagep->mID);
-	
 	// Name, pixel_area, requested pixel area, decode priority
 	char uuid_str[255];
 	mImagep->mID.toString(uuid_str);
diff --git a/indra/newview/llviewerjointattachment.h b/indra/newview/llviewerjointattachment.h
index d52d522b593bc2df79d9c3bea2ed5d7c6d5524f2..6fda81de5143c91d772af56ba152e25f7c0d89bb 100644
--- a/indra/newview/llviewerjointattachment.h
+++ b/indra/newview/llviewerjointattachment.h
@@ -59,7 +59,7 @@ class LLViewerJointAttachment :
 
 	S32 getGroup() { return mGroup; }
 	S32 getPieSlice() { return mPieSlice; }
-	BOOL getAttachmentDirty() { return mAttachmentDirty && mAttachedObject.notNull(); }
+	BOOL getAttachmentDirty() { return mAttachmentDirty && mAttachedObject; }
 	LLViewerObject *getObject() { return mAttachedObject; }
 	S32	getNumObjects() { return (mAttachedObject ? 1 : 0); }
 	const LLUUID& getItemID() { return mItemID; }
@@ -79,7 +79,8 @@ class LLViewerJointAttachment :
 	
 protected:
 	LLJoint*		mJoint;
-	LLPointer<LLViewerObject>	mAttachedObject;
+	// Backlink only; don't make this an LLPointer.
+	LLViewerObject*	mAttachedObject;
 	BOOL			mAttachmentDirty;	// does attachment drawable need to be fixed up?
 	BOOL			mVisibleInFirst;
 	LLVector3		mOriginalPos;
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 2b69c20d159865cd4be27f9c9344ffcfe0e12e31..600d7d3ca216463a36f5ed19f80cd70bbebd87b8 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -415,7 +415,7 @@ class LLFileQuit : public view_listener_t
 {
 	bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
 	{
-		app_request_quit();
+		app_user_quit();
 		return true;
 	}
 };
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index aa6993098d632d160e568404b563f82b5bfea5a1..9f034b6afd7a26b22a765b30d1de9fef4e192b02 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2248,6 +2248,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
 				}
 				break;
 			case CHAT_TYPE_DEBUG_MSG:
+			case CHAT_TYPE_OWNER:
 			case CHAT_TYPE_NORMAL:
 				verb = ": ";
 				break;
@@ -2553,7 +2554,7 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
 	msg->getStringFast(_PREHASH_Info, _PREHASH_SeedCapability,
 		STD_STRING_BUF_SIZE, seedCap);
 
-	// update home location if we are teleporting out of prelude
+	// update home location if we are teleporting out of prelude - specific to teleporting to welcome area 
 	if((teleport_flags & TELEPORT_FLAGS_SET_HOME_TO_TARGET)
 	   && (!gAgent.isGodlike()))
 	{
@@ -4257,6 +4258,8 @@ void notify_cautioned_script_question(LLScriptQuestionCBData* cbdata, S32 orig_q
 	// only continue if at least some permissions were requested
 	if (orig_questions)
 	{
+		// check to see if the person we are asking
+
 		// "'[OBJECTNAME]', an object owned by '[OWNERNAME]', 
 		// located in [REGIONNAME] at [REGIONPOS], 
 		// has been <granted|denied> permission to: [PERMISSIONS]."
@@ -4420,6 +4423,9 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
 	msg->getStringFast(_PREHASH_Data, _PREHASH_ObjectOwner, DB_FULL_NAME_BUF_SIZE, owner_name);
 	msg->getS32Fast(_PREHASH_Data, _PREHASH_Questions, questions );
 
+	// don't display permission requests if this object is muted - JS.
+	if (gMuteListp->isMuted(taskid)) return;
+
 	LLString script_question;
 	if (questions)
 	{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 75d7a97372092cc2af9ce4edb61f805921c141f2..5763f988defcae544251a17430e8dc00fb418004 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1134,7 +1134,7 @@ BOOL LLViewerWindow::handleCloseRequest(LLWindow *window)
 {
 	// User has indicated they want to close, but we may need to ask
 	// about modified documents.
-	app_request_quit();
+	app_user_quit();
 	// Don't quit immediately
 	return FALSE;
 }
diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h
index 836cd7add718b0569ef392a79196fe69cf222141..763cbe1419ef47135c8d684a5ba82fb35cee31b8 100644
--- a/indra/newview/llvosky.h
+++ b/indra/newview/llvosky.h
@@ -257,7 +257,7 @@ class LLHeavenBody
 	void setHorizonVisibility(const F32 c = 1)			{ mHorizonVisibility = c; }
 	const F32& getVisibility() const					{ return mVisibility; }
 	void setVisibility(const F32 c = 1)					{ mVisibility = c; }
-	const F32 getHaloBrighness() const
+	F32 getHaloBrighness() const
 	{
 		return llmax(0.f, llmin(0.9f, mHorizonVisibility)) * mVisibility;
 	}
diff --git a/indra/newview/llvowater.h b/indra/newview/llvowater.h
index e3df8220373f2140a2c98d72316b039f80c0ee8c..f7b3e34f8ddd6d0e68e6224b03b42ee8572d4109 100644
--- a/indra/newview/llvowater.h
+++ b/indra/newview/llvowater.h
@@ -12,9 +12,6 @@
 #include "llviewerobject.h"
 #include "llviewerimage.h"
 #include "v2math.h"
-#include "llfft.h"
-
-#include "llwaterpatch.h"
 
 const U32 N_RES	= 16; //32			// number of subdivisions of wave tile
 const U8  WAVE_STEP		= 8;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index eba306a2487ce1749e75795c8f36f6480281144f..23a2c0b758014b4c78b40d6a62b8fbb72761881a 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -412,8 +412,8 @@ def construct(self):
                         self.path("libstdc++.so.6")
                         self.path("libuuid.so", "libuuid.so.1")
                         self.path("libSDL-1.2.so.0")
-                        self.path("libtcmalloc.so.0")
-                        self.path("libstacktrace.so.0")
+                        #self.path("libtcmalloc.so.0")
+                        #self.path("libstacktrace.so.0")
                         self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason
                         self.end_prefix("lib")