From 7c61728b4bae928b2461f0f933dd1c1fa34ef0aa Mon Sep 17 00:00:00 2001
From: Rider Linden <rider@lindenlab.com>
Date: Mon, 24 Aug 2015 14:19:30 -0700
Subject: [PATCH] MAINT-4952: Removed a bit of debug code that got included
 accidentally and change host == LLHost() to host.isInvalid()

---
 indra/llmessage/llhost.h              | 3 ++-
 indra/llmessage/message.cpp           | 3 +--
 indra/llui/llurlentry.cpp             | 2 +-
 indra/newview/lltexturefetch.cpp      | 8 ++++----
 indra/newview/llviewertexturelist.cpp | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/indra/llmessage/llhost.h b/indra/llmessage/llhost.h
index 376371cffd4..79cad4b123d 100755
--- a/indra/llmessage/llhost.h
+++ b/indra/llmessage/llhost.h
@@ -88,7 +88,8 @@ class LLHost {
 	// READERS
 	U32		getAddress() const							{ return mIP; }
 	U32		getPort() const								{ return mPort; }
-	BOOL	isOk() const								{ return (mIP != INVALID_HOST_IP_ADDRESS) && (mPort != INVALID_PORT); }
+	bool	isOk() const								{ return (mIP != INVALID_HOST_IP_ADDRESS) && (mPort != INVALID_PORT); }
+    bool    isInvalid()                                 { return (mIP == INVALID_HOST_IP_ADDRESS) || (mPort == INVALID_PORT); }
 	size_t	hash() const								{ return (mIP << 16) | (mPort & 0xffff); }
 	std::string getString() const;
 	std::string getIPString() const;
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index 67121714181..10dbbef0464 100755
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -1151,8 +1151,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)
 	}
 
 	// NOTE: babbage: LLSD message -> HTTP, template message -> UDP
-//	if(mMessageBuilder == mLLSDMessageBuilder)
-  if (!host.getUntrustedSimulatorCap().empty())
+	if(mMessageBuilder == mLLSDMessageBuilder)
 	{
 		LLSD message = mLLSDMessageBuilder->getMessage();
 
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index adefae6e2d6..eb7f98e6187 100755
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -1006,7 +1006,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
 
 void LLUrlEntryParcel::sendParcelInfoRequest(const LLUUID& parcel_id)
 {
-	if (sRegionHost == LLHost() || sDisconnected) return;
+	if (sRegionHost.isInvalid() || sDisconnected) return;
 
 	LLMessageSystem *msg = gMessageSystem;
 	msg->newMessage("ParcelInfoRequest");
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 6674532efae..30d90431eaa 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1328,11 +1328,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
 
 		static LLCachedControl<bool> use_http(gSavedSettings, "ImagePipelineUseHTTP", true);
 
-// 		if (mHost != LLHost()) get_url = false;
+// 		if (mHost.isInvalid()) get_url = false;
 		if ( use_http && mCanUseHTTP && mUrl.empty())//get http url.
 		{
 			LLViewerRegion* region = NULL;
-			if (mHost == LLHost())
+			if (mHost.isInvalid())
 				region = gAgent.getRegion();
 			else
 				region = LLWorld::getInstance()->getRegion(mHost);
@@ -3224,7 +3224,7 @@ void LLTextureFetch::sendRequestListToSimulators()
 	{
 		LLHost host = iter1->first;
 		// invalid host = use agent host
-		if (host == LLHost())
+		if (host.isInvalid())
 		{
 			host = gAgent.getRegionHost();
 		}
@@ -3304,7 +3304,7 @@ void LLTextureFetch::sendRequestListToSimulators()
 				 iter1 != mCancelQueue.end(); ++iter1)
 			{
 				LLHost host = iter1->first;
-				if (host == LLHost())
+				if (host.isInvalid())
 				{
 					host = gAgent.getRegionHost();
 				}
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 0232dcfa15f..2fbd9f0acbb 100755
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -236,7 +236,7 @@ void LLViewerTextureList::shutdown()
 		if (!image->hasGLTexture() ||
 			!image->getUseDiscard() ||
 			image->needsAux() ||
-			image->getTargetHost() != LLHost() ||
+			!image->getTargetHost().isInvalid() ||
 			!image->getUrl().empty()
 			)
 		{
-- 
GitLab