diff options
author | Kelly Washington <kelly@lindenlab.com> | 2009-04-21 20:08:05 +0000 |
---|---|---|
committer | Kelly Washington <kelly@lindenlab.com> | 2009-04-21 20:08:05 +0000 |
commit | d5aad9ebc33059b34d42595d03fa4cba6b16ca9b (patch) | |
tree | c8e32181fc9c9d26d50684695d8c101bcc5162e1 /indra/llmessage/llservicebuilder.cpp | |
parent | 9b2d9c6e6e43f5600be64c65e42c373a199a3e1d (diff) |
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
Diffstat (limited to 'indra/llmessage/llservicebuilder.cpp')
-rw-r--r-- | indra/llmessage/llservicebuilder.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llmessage/llservicebuilder.cpp b/indra/llmessage/llservicebuilder.cpp index 3f07147ebc..4498480539 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); } |