From d5aad9ebc33059b34d42595d03fa4cba6b16ca9b Mon Sep 17 00:00:00 2001
From: Kelly Washington <kelly@lindenlab.com>
Date: Tue, 21 Apr 2009 20:08:05 +0000
Subject: [PATCH] svn merge -r117696:117697
 svn+ssh://svn.lindenlab.com/svn/linden/branches/fix-lslrpc/fix-lslrpc-merge
 to svn+ssh://svn.lindenlab.com/svn/linden/trunk

---
 indra/llcommon/indra_constants.h      |  2 +-
 indra/llcommon/llsdserialize.h        |  3 +++
 indra/llmessage/llservicebuilder.cpp  | 12 +++++++-----
 indra/llmessage/llservicebuilder.h    |  4 ++--
 scripts/messages/message_template.msg | 12 ++++++------
 5 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index e6ebdfd8cf5..c0b0d72d9bd 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -354,7 +354,7 @@ const U32 PARCEL_MEDIA_COMMAND_LOOP_SET = 13;
 const U32 MAP_ITEM_TELEHUB = 0x01;
 const U32 MAP_ITEM_PG_EVENT = 0x02;
 const U32 MAP_ITEM_MATURE_EVENT = 0x03;
-const U32 MAP_ITEM_POPULAR = 0x04;
+//const U32 MAP_ITEM_POPULAR = 0x04;		// No longer supported, 2009-03-02 KLW
 //const U32 MAP_ITEM_AGENT_COUNT = 0x05;
 const U32 MAP_ITEM_AGENT_LOCATIONS = 0x06;
 const U32 MAP_ITEM_LAND_FOR_SALE = 0x07;
diff --git a/indra/llcommon/llsdserialize.h b/indra/llcommon/llsdserialize.h
index f7cd91bb77f..bb38b75d8fd 100644
--- a/indra/llcommon/llsdserialize.h
+++ b/indra/llcommon/llsdserialize.h
@@ -753,6 +753,9 @@ class LLSDSerialize
 		LLPointer<LLSDXMLParser> p = new LLSDXMLParser;
 		return p->parse(str, sd, LLSDSerialize::SIZE_UNLIMITED);
 	}
+	// Line oriented parser, 30% faster than fromXML(), but can
+	// only be used when you know you have the complete XML
+	// document available in the stream.
 	static S32 fromXMLDocument(LLSD& sd, std::istream& str)
 	{
 		LLPointer<LLSDXMLParser> p = new LLSDXMLParser();
diff --git a/indra/llmessage/llservicebuilder.cpp b/indra/llmessage/llservicebuilder.cpp
index 3f07147ebca..44984805391 100644
--- a/indra/llmessage/llservicebuilder.cpp
+++ b/indra/llmessage/llservicebuilder.cpp
@@ -44,7 +44,7 @@ void LLServiceBuilder::loadServiceDefinitionsFromFile(
 	if(service_file.is_open())
 	{
 		LLSD service_data;
-		LLSDSerialize::fromXML(service_data, service_file);
+		LLSDSerialize::fromXMLDocument(service_data, service_file);
 		service_file.close();
 		// Load service 
 		LLSD service_map = service_data["services"];
@@ -94,11 +94,13 @@ bool starts_with(const std::string& text, const char* prefix)
 
 // TODO: Build a real services.xml for windows development.
 //       and remove the base_url logic below.
-std::string LLServiceBuilder::buildServiceURI(const std::string& service_name)
+std::string LLServiceBuilder::buildServiceURI(const std::string& service_name) const
 {
 	std::ostringstream service_url;
 	// Find the service builder
-	if(mServiceMap.find(service_name) != mServiceMap.end())
+	std::map<std::string, std::string>::const_iterator it =
+		mServiceMap.find(service_name);
+	if(it != mServiceMap.end())
 	{
 		// construct the service builder url
 		LLApp* app = LLApp::instance();
@@ -119,7 +121,7 @@ std::string LLServiceBuilder::buildServiceURI(const std::string& service_name)
 			}
 			service_url << base_url.asString();
 		}
-		service_url << mServiceMap[service_name];
+		service_url << it->second;
 	}
 	else
 	{
@@ -130,7 +132,7 @@ std::string LLServiceBuilder::buildServiceURI(const std::string& service_name)
 
 std::string LLServiceBuilder::buildServiceURI(
 	const std::string& service_name,
-	const LLSD& option_map)
+	const LLSD& option_map) const
 {
 	return russ_format(buildServiceURI(service_name), option_map);
 }
diff --git a/indra/llmessage/llservicebuilder.h b/indra/llmessage/llservicebuilder.h
index 40061a03926..0bcdb71b345 100644
--- a/indra/llmessage/llservicebuilder.h
+++ b/indra/llmessage/llservicebuilder.h
@@ -76,7 +76,7 @@ class LLServiceBuilder
 	 *
 	 * @param service_name The name of the service you want to call.
 	 */
-	std::string buildServiceURI(const std::string& service_name);
+	std::string buildServiceURI(const std::string& service_name) const;
 
 	/** 
 	 * @brief Build a service url if the url with construction parameters.
@@ -88,7 +88,7 @@ class LLServiceBuilder
 	 */
 	std::string buildServiceURI(
 		const std::string& service_name,
-		const LLSD& option_map);	
+		const LLSD& option_map) const;	
 
 public:
 	/** 
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index 22752ef33cd..5253e9a6b75 100644
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -1068,11 +1068,11 @@ version 2.0
 	}
 }
 
-// DirPopularQuery viewer->sim
+// DEPRECATED: DirPopularQuery viewer->sim
 // Special query for the land for sale/auction panel.
 // reliable
 {
-	DirPopularQuery Low 51 NotTrusted Zerocoded
+	DirPopularQuery Low 51 NotTrusted Zerocoded Deprecated
 	{
 		AgentData			Single
 		{	AgentID			LLUUID	}
@@ -1085,11 +1085,11 @@ version 2.0
 	}
 }
 
-// DirPopularQueryBackend sim->dataserver
+// DEPRECATED: DirPopularQueryBackend sim->dataserver
 // Special query for the land for sale/auction panel.
 // reliable
 {
-	DirPopularQueryBackend Low 52 Trusted Zerocoded
+	DirPopularQueryBackend Low 52 Trusted Zerocoded Deprecated
 	{
 		AgentData			Single
 		{	AgentID			LLUUID	}
@@ -1103,11 +1103,11 @@ version 2.0
 	}
 }
 
-// DirPopularReply
+// DEPRECATED: DirPopularReply
 // dataserver -> simulator -> viewer
 // reliable
 {
-	DirPopularReply Low 53 Trusted Zerocoded
+	DirPopularReply Low 53 Trusted Zerocoded Deprecated
 	{
 		AgentData			Single
 		{	AgentID			LLUUID	}
-- 
GitLab