From 2ea5ac0c43e3e28d2b1774f5367d099271a1da32 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 1 Jul 2024 13:34:50 +0200 Subject: #1111 Remove xmlrpc-epi --- indra/llmessage/CMakeLists.txt | 3 - indra/llmessage/llfiltersd2xmlrpc.cpp | 778 ---------------------------------- indra/llmessage/llfiltersd2xmlrpc.h | 271 ------------ 3 files changed, 1052 deletions(-) delete mode 100644 indra/llmessage/llfiltersd2xmlrpc.cpp delete mode 100644 indra/llmessage/llfiltersd2xmlrpc.h (limited to 'indra/llmessage') diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 5322139304..b2757a7306 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -27,7 +27,6 @@ set(llmessage_SOURCE_FILES lldatapacker.cpp lldispatcher.cpp llexperiencecache.cpp - llfiltersd2xmlrpc.cpp llgenericstreamingmessage.cpp llhost.cpp llhttpnode.cpp @@ -111,7 +110,6 @@ set(llmessage_HEADER_FILES lleventflags.h llexperiencecache.h llextendedstatus.h - llfiltersd2xmlrpc.h llfollowcamparams.h llgenericstreamingmessage.h llhost.h @@ -193,7 +191,6 @@ target_link_libraries( llfilesystem llmath llcorehttp - ll::xmlrpc-epi ) target_include_directories( llmessage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp deleted file mode 100644 index 84b56d54bf..0000000000 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ /dev/null @@ -1,778 +0,0 @@ -/** - * @file llfiltersd2xmlrpc.cpp - * @author Phoenix - * @date 2005-04-26 - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -/** - * xml rpc request: - * - * - * examples.getStateName - * 41 - * - * - * - * xml rpc response: - * - * - * - * South Dakota - * - * - * - * xml rpc fault: - * - * - * - * - * faultCode4 - * faultString... - * - * - * - * - * llsd rpc request: - * - * { 'method':'...', 'parameter':...]} - * - * - * llsd rpc response: - * - * { 'response':... } - * - * - * llsd rpc fault: - * - * { 'fault': {'code':i..., 'description':'...'} } - * - * - */ - -#include "linden_common.h" -#include "llfiltersd2xmlrpc.h" - -#include -#include - -#ifdef LL_USESYSTEMLIBS -#include -#else -#include -#endif - -#include "apr_base64.h" - -#include "llbuffer.h" -#include "llbufferstream.h" -#include "llfasttimer.h" -#include "llmemorystream.h" -#include "llsd.h" -#include "llsdserialize.h" -#include "lluuid.h" - -// spammy mode -//#define LL_SPEW_STREAM_OUT_DEBUGGING 1 - -/** - * String constants - */ -static const char XML_HEADER[] = ""; -static const char XMLRPC_REQUEST_HEADER_1[] = ""; -static const char XMLRPC_REQUEST_HEADER_2[] = ""; -static const char XMLRPC_REQUEST_FOOTER[] = ""; -static const char XMLRPC_METHOD_RESPONSE_HEADER[] = ""; -static const char XMLRPC_METHOD_RESPONSE_FOOTER[] = ""; -static const char XMLRPC_RESPONSE_HEADER[] = ""; -static const char XMLRPC_RESPONSE_FOOTER[] = ""; -static const char XMLRPC_FAULT_1[] = "faultCode"; -static const char XMLRPC_FAULT_2[] = "faultString"; -static const char XMLRPC_FAULT_3[] = ""; -static const char LLSDRPC_RESPONSE_HEADER[] = "{'response':"; -static const char LLSDRPC_RESPONSE_FOOTER[] = "}"; -const char LLSDRPC_REQUEST_HEADER_1[] = "{'method':'"; -const char LLSDRPC_REQUEST_HEADER_2[] = "', 'parameter': "; -const char LLSDRPC_REQUEST_FOOTER[] = "}"; -static const char LLSDRPC_FAULT_HADER_1[] = "{ 'fault': {'code':i"; -static const char LLSDRPC_FAULT_HADER_2[] = ", 'description':"; -static const char LLSDRPC_FAULT_FOOTER[] = "} }"; -static const S32 DEFAULT_PRECISION = 20; - -/** - * LLFilterSD2XMLRPC - */ -LLFilterSD2XMLRPC::LLFilterSD2XMLRPC() -{ -} - -LLFilterSD2XMLRPC::~LLFilterSD2XMLRPC() -{ -} - -std::string xml_escape_string(const std::string& in) -{ - std::ostringstream out; - std::string::const_iterator it = in.begin(); - std::string::const_iterator end = in.end(); - for(; it != end; ++it) - { - switch((*it)) - { - case '<': - out << "<"; - break; - case '>': - out << ">"; - break; - case '&': - out << "&"; - break; - case '\'': - out << "'"; - break; - case '"': - out << """; - break; - default: - out << (*it); - break; - } - } - return out.str(); -} - -void LLFilterSD2XMLRPC::streamOut(std::ostream& ostr, const LLSD& sd) -{ - ostr << ""; - switch(sd.type()) - { - case LLSD::TypeMap: - { -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(map) BEGIN" << LL_ENDL; -#endif - ostr << ""; - if(ostr.fail()) - { - LL_INFOS() << "STREAM FAILURE writing struct" << LL_ENDL; - } - LLSD::map_const_iterator it = sd.beginMap(); - LLSD::map_const_iterator end = sd.endMap(); - for(; it != end; ++it) - { - ostr << "" << xml_escape_string((*it).first) - << ""; - streamOut(ostr, (*it).second); - if(ostr.fail()) - { - LL_INFOS() << "STREAM FAILURE writing '" << (*it).first - << "' with sd type " << (*it).second.type() << LL_ENDL; - } - ostr << ""; - } - ostr << ""; -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(map) END" << LL_ENDL; -#endif - break; - } - case LLSD::TypeArray: - { -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(array) BEGIN" << LL_ENDL; -#endif - ostr << ""; - LLSD::array_const_iterator it = sd.beginArray(); - LLSD::array_const_iterator end = sd.endArray(); - for(; it != end; ++it) - { - streamOut(ostr, *it); - if(ostr.fail()) - { - LL_INFOS() << "STREAM FAILURE writing array element sd type " - << (*it).type() << LL_ENDL; - } - } -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(array) END" << LL_ENDL; -#endif - ostr << ""; - break; - } - case LLSD::TypeUndefined: - // treat undefined as a bool with a false value. - case LLSD::TypeBoolean: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(bool)" << LL_ENDL; -#endif - ostr << "" << (sd.asBoolean() ? "1" : "0") << ""; - break; - case LLSD::TypeInteger: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(int)" << LL_ENDL; -#endif - ostr << "" << sd.asInteger() << ""; - break; - case LLSD::TypeReal: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(real)" << LL_ENDL; -#endif - ostr << "" << sd.asReal() << ""; - break; - case LLSD::TypeString: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(string)" << LL_ENDL; -#endif - ostr << "" << xml_escape_string(sd.asString()) << ""; - break; - case LLSD::TypeUUID: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(uuid)" << LL_ENDL; -#endif - // serialize it as a string - ostr << "" << sd.asString() << ""; - break; - case LLSD::TypeURI: - { -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(uri)" << LL_ENDL; -#endif - // serialize it as a string - ostr << "" << xml_escape_string(sd.asString()) << ""; - break; - } - case LLSD::TypeBinary: - { -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(binary)" << LL_ENDL; -#endif - // this is pretty inefficient, but we'll deal with that - // problem when it becomes one. - ostr << ""; - LLSD::Binary buffer = sd.asBinary(); - if(!buffer.empty()) - { - // *TODO: convert to LLBase64 - int b64_buffer_length = apr_base64_encode_len(static_cast(buffer.size())); - char* b64_buffer = new char[b64_buffer_length]; - b64_buffer_length = apr_base64_encode_binary( - b64_buffer, - &buffer[0], - static_cast(buffer.size())); - ostr.write(b64_buffer, b64_buffer_length - 1); - delete[] b64_buffer; - } - ostr << ""; - break; - } - case LLSD::TypeDate: -#if LL_SPEW_STREAM_OUT_DEBUGGING - LL_INFOS() << "streamOut(date)" << LL_ENDL; -#endif - // no need to escape this since it will be alpha-numeric. - ostr << "" << sd.asString() << ""; - break; - default: - // unhandled type - LL_WARNS() << "Unhandled structured data type: " << sd.type() - << LL_ENDL; - break; - } - ostr << ""; -} - -/** - * LLFilterSD2XMLRPCResponse - */ - -LLFilterSD2XMLRPCResponse::LLFilterSD2XMLRPCResponse() -{ -} - -LLFilterSD2XMLRPCResponse::~LLFilterSD2XMLRPCResponse() -{ -} - - -// virtual -LLIOPipe::EStatus LLFilterSD2XMLRPCResponse::process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump) -{ - LL_PROFILE_ZONE_SCOPED; - - PUMP_DEBUG; - // This pipe does not work if it does not have everyting. This - // could be addressed by making a stream parser for llsd which - // handled partial information. - if(!eos) - { - return STATUS_BREAK; - } - - PUMP_DEBUG; - // we have everyting in the buffer, so turn the structure data rpc - // response into an xml rpc response. - LLBufferStream stream(channels, buffer.get()); - stream << XML_HEADER << XMLRPC_METHOD_RESPONSE_HEADER; - LLSD sd; - LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in())); - - PUMP_DEBUG; - LLIOPipe::EStatus rv = STATUS_ERROR; - if(sd.has("response")) - { - PUMP_DEBUG; - // it is a normal response. pack it up and ship it out. - stream.precision(DEFAULT_PRECISION); - stream << XMLRPC_RESPONSE_HEADER; - streamOut(stream, sd["response"]); - stream << XMLRPC_RESPONSE_FOOTER << XMLRPC_METHOD_RESPONSE_FOOTER; - rv = STATUS_DONE; - } - else if(sd.has("fault")) - { - PUMP_DEBUG; - // it is a fault. - stream << XMLRPC_FAULT_1 << sd["fault"]["code"].asInteger() - << XMLRPC_FAULT_2 - << xml_escape_string(sd["fault"]["description"].asString()) - << XMLRPC_FAULT_3 << XMLRPC_METHOD_RESPONSE_FOOTER; - rv = STATUS_DONE; - } - else - { - LL_WARNS() << "Unable to determine the type of LLSD response." << LL_ENDL; - } - PUMP_DEBUG; - return rv; -} - -/** - * LLFilterSD2XMLRPCRequest - */ -LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest() -{ -} - -LLFilterSD2XMLRPCRequest::LLFilterSD2XMLRPCRequest(const char* method) -{ - if(method) - { - mMethod.assign(method); - } -} - -LLFilterSD2XMLRPCRequest::~LLFilterSD2XMLRPCRequest() -{ -} - -// virtual -LLIOPipe::EStatus LLFilterSD2XMLRPCRequest::process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump) -{ - LL_PROFILE_ZONE_SCOPED; - // This pipe does not work if it does not have everyting. This - // could be addressed by making a stream parser for llsd which - // handled partial information. - PUMP_DEBUG; - if(!eos) - { - LL_INFOS() << "!eos" << LL_ENDL; - return STATUS_BREAK; - } - - // See if we can parse it - LLBufferStream stream(channels, buffer.get()); - LLSD sd; - LLSDSerialize::fromNotation(sd, stream, buffer->count(channels.in())); - if(stream.fail()) - { - LL_INFOS() << "STREAM FAILURE reading structure data." << LL_ENDL; - } - - PUMP_DEBUG; - // We can get the method and parameters from either the member - // function or passed in via the buffer. We prefer the buffer if - // we found a parameter and a method, or fall back to using - // mMethod and putting everyting in the buffer into the parameter. - std::string method; - LLSD param_sd; - if(sd.has("method") && sd.has("parameter")) - { - method = sd["method"].asString(); - param_sd = sd["parameter"]; - } - else - { - method = mMethod; - param_sd = sd; - } - if(method.empty()) - { - LL_WARNS() << "SD -> XML Request no method found." << LL_ENDL; - return STATUS_ERROR; - } - - PUMP_DEBUG; - // We have a method, and some kind of parameter, so package it up - // and send it out. - LLBufferStream ostream(channels, buffer.get()); - ostream.precision(DEFAULT_PRECISION); - if(ostream.fail()) - { - LL_INFOS() << "STREAM FAILURE setting precision" << LL_ENDL; - } - ostream << XML_HEADER << XMLRPC_REQUEST_HEADER_1 - << xml_escape_string(method) << XMLRPC_REQUEST_HEADER_2; - if(ostream.fail()) - { - LL_INFOS() << "STREAM FAILURE writing method headers" << LL_ENDL; - } - switch(param_sd.type()) - { - case LLSD::TypeMap: - // If the params are a map, then we do not want to iterate - // through them since the iterators returned will be map - // ordered un-named values, which will lose the names, and - // only stream the values, turning it into an array. - ostream << ""; - streamOut(ostream, param_sd); - ostream << ""; - break; - case LLSD::TypeArray: - { - - LLSD::array_iterator it = param_sd.beginArray(); - LLSD::array_iterator end = param_sd.endArray(); - for(; it != end; ++it) - { - ostream << ""; - streamOut(ostream, *it); - ostream << ""; - } - break; - } - default: - ostream << ""; - streamOut(ostream, param_sd); - ostream << ""; - break; - } - - stream << XMLRPC_REQUEST_FOOTER; - return STATUS_DONE; -} - -/** - * LLFilterXMLRPCResponse2LLSD - */ -// this is a c function here since it's really an implementation -// detail that requires a header file just get the definition of the -// parameters. -LLIOPipe::EStatus stream_out(std::ostream& ostr, XMLRPC_VALUE value) -{ - XMLRPC_VALUE_TYPE_EASY type = XMLRPC_GetValueTypeEasy(value); - LLIOPipe::EStatus status = LLIOPipe::STATUS_OK; - switch(type) - { - case xmlrpc_type_base64: - { - S32 len = XMLRPC_GetValueStringLen(value); - const char* buf = XMLRPC_GetValueBase64(value); - ostr << " b("; - if((len > 0) && buf) - { - ostr << len << ")\""; - ostr.write(buf, len); - ostr << "\""; - } - else - { - ostr << "0)\"\""; - } - break; - } - case xmlrpc_type_boolean: - //LL_DEBUGS() << "stream_out() bool" << LL_ENDL; - ostr << " " << (XMLRPC_GetValueBoolean(value) ? "true" : "false"); - break; - case xmlrpc_type_datetime: - ostr << " d\"" << XMLRPC_GetValueDateTime_ISO8601(value) << "\""; - break; - case xmlrpc_type_double: - ostr << " r" << XMLRPC_GetValueDouble(value); - //LL_DEBUGS() << "stream_out() double" << XMLRPC_GetValueDouble(value) - // << LL_ENDL; - break; - case xmlrpc_type_int: - ostr << " i" << XMLRPC_GetValueInt(value); - //LL_DEBUGS() << "stream_out() integer:" << XMLRPC_GetValueInt(value) - // << LL_ENDL; - break; - case xmlrpc_type_string: - //LL_DEBUGS() << "stream_out() string: " << str << LL_ENDL; - ostr << " s(" << XMLRPC_GetValueStringLen(value) << ")'" - << XMLRPC_GetValueString(value) << "'"; - break; - case xmlrpc_type_array: // vector - case xmlrpc_type_mixed: // vector - { - //LL_DEBUGS() << "stream_out() array" << LL_ENDL; - ostr << " ["; - U32 needs_comma = 0; - XMLRPC_VALUE current = XMLRPC_VectorRewind(value); - while(current && (LLIOPipe::STATUS_OK == status)) - { - if(needs_comma++) ostr << ","; - status = stream_out(ostr, current); - current = XMLRPC_VectorNext(value); - } - ostr << "]"; - break; - } - case xmlrpc_type_struct: // still vector - { - //LL_DEBUGS() << "stream_out() struct" << LL_ENDL; - ostr << " {"; - std::string name; - U32 needs_comma = 0; - XMLRPC_VALUE current = XMLRPC_VectorRewind(value); - while(current && (LLIOPipe::STATUS_OK == status)) - { - if(needs_comma++) ostr << ","; - name.assign(XMLRPC_GetValueID(current)); - ostr << "'" << LLSDNotationFormatter::escapeString(name) << "':"; - status = stream_out(ostr, current); - current = XMLRPC_VectorNext(value); - } - ostr << "}"; - break; - } - case xmlrpc_type_empty: - case xmlrpc_type_none: - default: - status = LLIOPipe::STATUS_ERROR; - LL_WARNS() << "Found an empty xmlrpc type.." << LL_ENDL; - // not much we can do here... - break; - }; - return status; -} - -LLFilterXMLRPCResponse2LLSD::LLFilterXMLRPCResponse2LLSD() -{ -} - -LLFilterXMLRPCResponse2LLSD::~LLFilterXMLRPCResponse2LLSD() -{ -} - -LLIOPipe::EStatus LLFilterXMLRPCResponse2LLSD::process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump) -{ - LL_PROFILE_ZONE_SCOPED; - - PUMP_DEBUG; - if(!eos) return STATUS_BREAK; - if(!buffer) return STATUS_ERROR; - - PUMP_DEBUG; - // *FIX: This technique for reading data is far from optimal. We - // need to have some kind of istream interface into the xml - // parser... - S32 bytes = buffer->countAfter(channels.in(), NULL); - if(!bytes) return STATUS_ERROR; - char* buf = new char[bytes + 1]; - buf[bytes] = '\0'; - buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes); - - //LL_DEBUGS() << "xmlrpc response: " << buf << LL_ENDL; - - PUMP_DEBUG; - XMLRPC_REQUEST response = XMLRPC_REQUEST_FromXML( - buf, - bytes, - NULL); - if(!response) - { - LL_WARNS() << "XML -> SD Response unable to parse xml." << LL_ENDL; - delete[] buf; - return STATUS_ERROR; - } - - PUMP_DEBUG; - LLBufferStream stream(channels, buffer.get()); - stream.precision(DEFAULT_PRECISION); - if(XMLRPC_ResponseIsFault(response)) - { - PUMP_DEBUG; - stream << LLSDRPC_FAULT_HADER_1 - << XMLRPC_GetResponseFaultCode(response) - << LLSDRPC_FAULT_HADER_2; - const char* fault_str = XMLRPC_GetResponseFaultString(response); - std::string fault_string; - if(fault_str) - { - fault_string.assign(fault_str); - } - stream << "'" << LLSDNotationFormatter::escapeString(fault_string) - << "'" <countAfter(channels.in(), NULL); - if(!bytes) return STATUS_ERROR; - char* buf = new char[bytes + 1]; - buf[bytes] = '\0'; - buffer->readAfter(channels.in(), NULL, (U8*)buf, bytes); - - //LL_DEBUGS() << "xmlrpc request: " << buf << LL_ENDL; - - // Check the value in the buffer. XMLRPC_REQUEST_FromXML will report a error code 4 if - // values that are less than 0x20 are passed to it, except - // 0x09: Horizontal tab; 0x0a: New Line; 0x0d: Carriage - U8* cur_pBuf = (U8*)buf; - U8 cur_char; - for (S32 i=0; i SD Request process parse error." << LL_ENDL; - delete[] buf; - return STATUS_ERROR; - } - - PUMP_DEBUG; - LLBufferStream stream(channels, buffer.get()); - stream.precision(DEFAULT_PRECISION); - const char* name = XMLRPC_RequestGetMethodName(request); - stream << LLSDRPC_REQUEST_HEADER_1 << (name ? name : "") - << LLSDRPC_REQUEST_HEADER_2; - XMLRPC_VALUE param = XMLRPC_RequestGetData(request); - if(param) - { - PUMP_DEBUG; - S32 size = XMLRPC_VectorSize(param); - if(size > 1) - { - // if there are multiple parameters, stuff the values into - // an array so that the next step in the chain can read them. - stream << "["; - } - XMLRPC_VALUE current = XMLRPC_VectorRewind(param); - bool needs_comma = false; - while(current) - { - if(needs_comma) - { - stream << ","; - } - needs_comma = true; - stream_out(stream, current); - current = XMLRPC_VectorNext(param); - } - if(size > 1) - { - // close the array - stream << "]"; - } - } - stream << LLSDRPC_REQUEST_FOOTER; - XMLRPC_RequestFree(request, 1); - delete[] buf; - PUMP_DEBUG; - return STATUS_DONE; -} - diff --git a/indra/llmessage/llfiltersd2xmlrpc.h b/indra/llmessage/llfiltersd2xmlrpc.h deleted file mode 100644 index 55938d3e2b..0000000000 --- a/indra/llmessage/llfiltersd2xmlrpc.h +++ /dev/null @@ -1,271 +0,0 @@ -/** - * @file llfiltersd2xmlrpc.h - * @author Phoenix - * @date 2005-04-26 - * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifndef LL_LLFILTERSD2XMLRPC_H -#define LL_LLFILTERSD2XMLRPC_H - -/** - * These classes implement the necessary pipes for translating between - * xmlrpc and llsd rpc. The llsd rpcs mechanism was developed as an - * extensible and easy to parse serialization grammer which maintains - * a time efficient in-memory representation. - */ - -#include -#include "lliopipe.h" - -/** - * @class LLFilterSD2XMLRPC - * @brief Filter from serialized LLSD to an XMLRPC method call - * - * This clas provides common functionality for the LLFilterSD2XMLRPRC - * request and response classes. - */ -class LLFilterSD2XMLRPC : public LLIOPipe -{ -public: - LLFilterSD2XMLRPC(); - virtual ~LLFilterSD2XMLRPC(); - -protected: - /** - * @brief helper method - */ - void streamOut(std::ostream& ostr, const LLSD& sd); -}; - -/** - * @class LLFilterSD2XMLRPCResponse - * @brief Filter from serialized LLSD to an XMLRPC response - * - * This class filters a serialized LLSD object to an xmlrpc - * repsonse. Since resonses are limited to a single param, the xmlrprc - * response only serializes it as one object. - * This class correctly handles normal llsd responses as well as llsd - * rpc faults. - * - * For example, if given: - * {'response':[ i200, r3.4, {"foo":"bar"} ]} - * Would generate: - * - * - * - * 200 - * 3.4 - * - * foobar - * - * - * - */ -class LLFilterSD2XMLRPCResponse : public LLFilterSD2XMLRPC -{ -public: - // constructor - LLFilterSD2XMLRPCResponse(); - - // destructor - virtual ~LLFilterSD2XMLRPCResponse(); - - /* @name LLIOPipe virtual implementations - */ - //@{ -protected: - /** - * @brief Process the data in buffer. - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} -}; - -/** - * @class LLFilterSD2XMLRPCRequest - * @brief Filter from serialized LLSD to an XMLRPC method call - * - * This class will accept any kind of serialized LLSD object, but you - * probably want to have an array on the outer boundary since this - * object will interpret each element in the top level LLSD as a - * parameter into the xmlrpc spec. - * - * For example, you would represent 3 params as: - * - * {'method'='foo', 'parameter':[i200, r3.4, {"foo":"bar"}]} - * - * To generate: - * - * - * - * 200 - * 3.4 - * - * foobar - * - * - * - * This class will accept 2 different kinds of encodings. The first - * just an array of params as long as you specify the method in the - * constructor. It will also accept a structured data in the form: - * {'method':'$method_name', 'parameter':[...] } In the latter form, the - * encoded 'method' will be used regardless of the construction of the - * object, and the 'parameter' will be used as parameter to the call. - */ -class LLFilterSD2XMLRPCRequest : public LLFilterSD2XMLRPC -{ -public: - // constructor - LLFilterSD2XMLRPCRequest(); - - // constructor - LLFilterSD2XMLRPCRequest(const char* method); - - // destructor - virtual ~LLFilterSD2XMLRPCRequest(); - - /* @name LLIOPipe virtual implementations - */ - //@{ -protected: - /** - * @brief Process the data in buffer. - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} - -protected: - // The method name of this request. - std::string mMethod; -}; - -/** - * @class LLFilterXMLRPCResponse2LLSD - * @brief Filter from serialized XMLRPC method response to LLSD - * - * The xmlrpc spec states that responses can only have one element - * which can be of any supported type. - * This takes in xml of the form: - * - * - * ok - * - * And processes it into: - * 'ok' - * - */ -class LLFilterXMLRPCResponse2LLSD : public LLIOPipe -{ -public: - // constructor - LLFilterXMLRPCResponse2LLSD(); - - // destructor - virtual ~LLFilterXMLRPCResponse2LLSD(); - - /* @name LLIOPipe virtual implementations - */ - //@{ -protected: - /** - * @brief Process the data in buffer. - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} - -protected: -}; - -/** - * @class LLFilterXMLRPCRequest2LLSD - * @brief Filter from serialized XMLRPC method call to LLSD - * - * This takes in xml of the form: - * - * - * repeat - * - * 4 - * ok - * - * - * And processes it into: - * { 'method':'repeat', 'params':[i4, 'ok'] } - */ -class LLFilterXMLRPCRequest2LLSD : public LLIOPipe -{ -public: - // constructor - LLFilterXMLRPCRequest2LLSD(); - - // destructor - virtual ~LLFilterXMLRPCRequest2LLSD(); - - /* @name LLIOPipe virtual implementations - */ - //@{ -protected: - /** - * @brief Process the data in buffer. - */ - virtual EStatus process_impl( - const LLChannelDescriptors& channels, - buffer_ptr_t& buffer, - bool& eos, - LLSD& context, - LLPumpIO* pump); - //@} - -protected: -}; - -/** - * @brief This function takes string, and escapes it appropritately - * for inclusion as xml data. - */ -std::string xml_escape_string(const std::string& in); - -/** - * @brief Externally available constants - */ -extern const char LLSDRPC_REQUEST_HEADER_1[]; -extern const char LLSDRPC_REQUEST_HEADER_2[]; -extern const char LLSDRPC_REQUEST_FOOTER[]; - -#endif // LL_LLFILTERSD2XMLRPC_H -- cgit v1.2.3 From 08b933a0c67463f06f124420f16c8a3f7dc83f1f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 3 Jul 2024 17:42:24 -0500 Subject: #1870 Tune up for better experience on integrated intel with low memory (#1872) * More deterministic vsize calculation. Add control for choosing downscale method. * Quick hack to make GLTF preview work again --- indra/llmessage/llassetstorage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 70a7a34a70..2de59c1b6a 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -484,6 +484,8 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, void *user_data, bool is_priority) { + LL_PROFILE_ZONE_SCOPED; + LL_DEBUGS("AssetStorage") << "LLAssetStorage::getAssetData() - " << uuid << "," << LLAssetType::lookup(type) << LL_ENDL; LL_DEBUGS("AssetStorage") << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << LL_ENDL; @@ -529,6 +531,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, if (size > 0) { + LL_PROFILE_ZONE_NAMED("gad - file in cache"); // we've already got the file // theoretically, partial files w/o a pending request shouldn't happen // unless there's a weird error @@ -548,7 +551,7 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, } bool duplicate = false; - + LL_PROFILE_ZONE_NAMED("gad - check pending downloads"); // check to see if there's a pending download of this uuid already for (request_list_t::iterator iter = mPendingDownloads.begin(); iter != mPendingDownloads.end(); ++iter ) -- cgit v1.2.3 From 1296afd96a74877feb91690ec8dcd99b225554b8 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Thu, 4 Jul 2024 13:02:34 -0400 Subject: Reduce LLSD::Binary temporaries --- indra/llmessage/llcorehttputil.cpp | 2 +- indra/llmessage/lltemplatemessagedispatcher.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 684e96883f..3fdc691141 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -523,7 +523,7 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:: bas >> std::noskipws; data.assign(std::istream_iterator(bas), std::istream_iterator()); - result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = data; + result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = std::move(data); #else // This is disabled because it's dangerous. See the other case for an diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp index 0e709d6c75..edbeb4acc1 100644 --- a/indra/llmessage/lltemplatemessagedispatcher.cpp +++ b/indra/llmessage/lltemplatemessagedispatcher.cpp @@ -43,7 +43,7 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name, const LLSD& message, LLHTTPNode::ResponsePtr responsep) { - std::vector data = message["body"]["binary-template-data"].asBinary(); + const LLSD::Binary& data = message["body"]["binary-template-data"].asBinary(); auto size = data.size(); if(size == 0) { @@ -53,11 +53,11 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name, LLHost host; host = gMessageSystem->getSender(); - bool validate_message = mTemplateMessageReader.validateMessage(&(data[0]), static_cast(size), host, true); + bool validate_message = mTemplateMessageReader.validateMessage(data.data(), static_cast(size), host, true); if (validate_message) { - mTemplateMessageReader.readMessage(&(data[0]),host); + mTemplateMessageReader.readMessage(data.data(),host); } else { -- cgit v1.2.3 From 9fdca96f8bd2211a99fe88e57b70cbecefa20b6d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 8 Jul 2024 20:27:14 +0200 Subject: Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now --- indra/llmessage/llbuffer.cpp | 16 ++++++++-------- indra/llmessage/llbufferstream.cpp | 4 ++-- indra/llmessage/llcircuit.cpp | 4 ++-- indra/llmessage/lliohttpserver.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index dc7115b167..3a4b493b26 100644 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp @@ -142,7 +142,7 @@ LLHeapBuffer::~LLHeapBuffer() S32 LLHeapBuffer::bytesLeft() const { - return (mSize - (mNextFree - mBuffer)); + return (mSize - (S32)(mNextFree - mBuffer)); } // virtual @@ -371,11 +371,11 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address) return it; } S32 channel = (*it).getChannel(); - LLSegment segment1(channel, base, (address - base) + 1); + LLSegment segment1(channel, base, (S32)((address - base) + 1)); *it = segment1; segment_iterator_t rv = it; ++it; - LLSegment segment2(channel, address + 1, size - (address - base) - 1); + LLSegment segment2(channel, address + 1, (S32)(size - (address - base) - 1)); mSegments.insert(it, segment2); return rv; } @@ -424,7 +424,7 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter( segment = LLSegment( (*rv).getChannel(), address, - (*rv).size() - (address - (*rv).data())); + (*rv).size() - (S32)(address - (*rv).data())); } else { @@ -533,7 +533,7 @@ S32 LLBufferArray::countAfter(S32 channel, U8* start) const if(++start < ((*it).data() + (*it).size())) { // it's in the same segment - offset = start - (*it).data(); + offset = (S32)(start - (*it).data()); } else if(++it == end) { @@ -586,7 +586,7 @@ U8* LLBufferArray::readAfter( && (*it).isOnChannel(channel)) { // copy the data out of this segment - S32 bytes_in_segment = (*it).size() - (start - (*it).data()); + S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data()); bytes_to_copy = llmin(bytes_left, bytes_in_segment); memcpy(dest, start, bytes_to_copy); /*Flawfinder: ignore*/ len += bytes_to_copy; @@ -681,7 +681,7 @@ U8* LLBufferArray::seek( { if(delta > 0) { - S32 bytes_in_segment = (*it).size() - (start - (*it).data()); + S32 bytes_in_segment = (*it).size() - (S32)(start - (*it).data()); S32 local_delta = llmin(delta, bytes_in_segment); rv += local_delta; delta -= local_delta; @@ -689,7 +689,7 @@ U8* LLBufferArray::seek( } else { - S32 bytes_in_segment = start - (*it).data(); + S32 bytes_in_segment = (S32)(start - (*it).data()); S32 local_delta = llmin(llabs(delta), bytes_in_segment); rv -= local_delta; delta += local_delta; diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index e51b489813..2c745f6fe4 100644 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp @@ -273,7 +273,7 @@ streampos LLBufferStreamBuf::seekoff( } LLMutexLock lock(mBuffer->getMutex()); - address = mBuffer->seek(mChannels.in(), base_addr, off); + address = mBuffer->seek(mChannels.in(), base_addr, (S32)off); if(address) { LLBufferArray::segment_iterator_t iter; @@ -306,7 +306,7 @@ streampos LLBufferStreamBuf::seekoff( } LLMutexLock lock(mBuffer->getMutex()); - address = mBuffer->seek(mChannels.out(), base_addr, off); + address = mBuffer->seek(mChannels.out(), base_addr, (S32)off); if(address) { LLBufferArray::segment_iterator_t iter; diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index bf22f3d3f0..8f9c02bdca 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -525,13 +525,13 @@ void LLCircuitData::checkPeriodTime() F64Seconds period_length = mt_sec - mPeriodTime; if ( period_length > TARGET_PERIOD_LENGTH) { - F32 bps_in = F32Bits(mBytesInThisPeriod).value() / period_length.value(); + F32 bps_in = F32Bits(mBytesInThisPeriod).value() / (F32)period_length.value(); if (bps_in > mPeakBPSIn) { mPeakBPSIn = bps_in; } - F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / period_length.value(); + F32 bps_out = F32Bits(mBytesOutThisPeriod).value() / (F32)period_length.value(); if (bps_out > mPeakBPSOut) { mPeakBPSOut = bps_out; diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index e562f09844..edc431e538 100644 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp @@ -625,7 +625,7 @@ bool LLHTTPResponder::readHeaderLine( } return false; } - S32 offset = -((len - 1) - (newline - dest)); + S32 offset = -((len - 1) - (S32)(newline - dest)); ++newline; *newline = '\0'; mLastRead = buffer->seek(channels.in(), last, offset); -- cgit v1.2.3 From 3013424057d8963bb55eca4bd58a91c21e4395fc Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 21 Jul 2024 20:10:21 -0400 Subject: Fix rare shutdown crash in gCacheName --- indra/llmessage/llcachename.cpp | 33 ++++++++++++++++----------------- indra/llmessage/llcachename.h | 7 ++++--- 2 files changed, 20 insertions(+), 20 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 63ac46722a..64f660d0ce 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -53,7 +53,6 @@ const U32 PENDING_TIMEOUT_SECS = 5 * 60; // Globals LLCacheName* gCacheName = NULL; -std::map LLCacheName::sCacheName; /// --------------------------------------------------------------------------- /// class LLCacheNameEntry @@ -215,7 +214,7 @@ public: Impl(LLMessageSystem* msg); ~Impl(); - bool getName(const LLUUID& id, std::string& first, std::string& last); + bool getName(const LLUUID& id, std::string& first, std::string& last, std::map& default_names); boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback); void addPending(const LLUUID& id, const LLHost& host); @@ -247,9 +246,9 @@ LLCacheName::LLCacheName(LLMessageSystem* msg) LLCacheName::LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host) : impl(* new Impl(msg)) { - sCacheName["waiting"] = "(Loading...)"; - sCacheName["nobody"] = "(nobody)"; - sCacheName["none"] = "(none)"; + mCacheName["waiting"] = "(Loading...)"; + mCacheName["nobody"] = "(nobody)"; + mCacheName["none"] = "(none)"; setUpstream(upstream_host); } @@ -274,7 +273,7 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg) LLCacheName::Impl::~Impl() { - for_each(mCache.begin(), mCache.end(), DeletePairedPointer()); + std::for_each(mCache.begin(), mCache.end(), DeletePairedPointer()); mCache.clear(); for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer()); mReplyQueue.clear(); @@ -402,11 +401,11 @@ void LLCacheName::exportFile(std::ostream& ostr) } -bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last) +bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::string& last, std::map& default_names) { if(id.isNull()) { - first = sCacheName["nobody"]; + first = default_names["nobody"]; last.clear(); return true; } @@ -420,7 +419,7 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin } else { - first = sCacheName["waiting"]; + first = default_names["waiting"]; last.clear(); if (!isRequestPending(id)) { @@ -434,8 +433,8 @@ bool LLCacheName::Impl::getName(const LLUUID& id, std::string& first, std::strin // static void LLCacheName::localizeCacheName(std::string key, std::string value) { - if (key!="" && value!= "" ) - sCacheName[key]=value; + if (!key.empty() && !value.empty()) + mCacheName[key]=value; else LL_WARNS()<< " Error localizing cache key " << key << " To "<< value< sCacheName; + void localizeCacheName(std::string key, std::string value); + private: + std::map mCacheName; class Impl; Impl& impl; -- cgit v1.2.3 From c7c7342ed3bc17fcef5b5fe0970859ac753a6639 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Sun, 28 Jul 2024 13:03:25 -0400 Subject: Update boost to 1.85 and fix deprecation warnings --- indra/llmessage/llcorehttputil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 3fdc691141..918a69be6f 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -585,7 +585,7 @@ LLSD HttpCoroJSONHandler::handleSuccess(LLCore::HttpResponse * response, LLCore: LLCore::BufferArrayStream bas(body); - boost::json::error_code ec; + boost::system::error_code ec; boost::json::value jsonRoot = boost::json::parse(bas, ec); if(ec.failed()) { // deserialization failed. Record the reason and pass back an empty map for markup. @@ -610,7 +610,7 @@ LLSD HttpCoroJSONHandler::parseBody(LLCore::HttpResponse *response, bool &succes LLCore::BufferArrayStream bas(body); - boost::json::error_code ec; + boost::system::error_code ec; boost::json::value jsonRoot = boost::json::parse(bas, ec); if (ec.failed()) { -- cgit v1.2.3 From b5e306f7d89e82984a37824a3640bd67a5c45d61 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 14 Aug 2024 11:01:02 -0400 Subject: Enable /permissive- on MSVC for better standards conformance (#2251) * Enable /permissive- on MSVC for better C++ conformance and fix related errors * Clean up left over warning suppressions from old library or msvc versions --- indra/llmessage/llblowfishcipher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp index ed036e396d..3973565e22 100644 --- a/indra/llmessage/llblowfishcipher.cpp +++ b/indra/llmessage/llblowfishcipher.cpp @@ -88,7 +88,7 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) src_len)) { LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptUpdate failure" << LL_ENDL; - goto ERROR; + goto BF_ENCRYPT_ERROR; } // There may be some final data left to encrypt if the input is @@ -96,14 +96,14 @@ U32 LLBlowfishCipher::encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) if (!EVP_EncryptFinal_ex(context, (unsigned char*)(dst + output_len), &temp_len)) { LL_WARNS() << "LLBlowfishCipher::encrypt EVP_EncryptFinal failure" << LL_ENDL; - goto ERROR; + goto BF_ENCRYPT_ERROR; } output_len += temp_len; EVP_CIPHER_CTX_free(context); return output_len; -ERROR: +BF_ENCRYPT_ERROR: EVP_CIPHER_CTX_free(context); return 0; } -- cgit v1.2.3 From 9f7dd0177201fe080c287144b99a70125be1fb2b Mon Sep 17 00:00:00 2001 From: Ansariel Hiller Date: Tue, 20 Aug 2024 17:41:48 +0200 Subject: Clean up boost includes and remove compiler warning pragma for unreachable code in PCH (#2361) --- indra/llmessage/lliopipe.h | 1 - indra/llmessage/llservice.h | 64 --------------------------------------- indra/llmessage/llstoredmessage.h | 1 - 3 files changed, 66 deletions(-) (limited to 'indra/llmessage') diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h index a58ee045c2..1887b5cd9a 100644 --- a/indra/llmessage/lliopipe.h +++ b/indra/llmessage/lliopipe.h @@ -30,7 +30,6 @@ #define LL_LLIOPIPE_H #include -#include #include "llwin32headerslean.h" #include "apr_poll.h" diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h index 6c32fa8102..7853e357f9 100644 --- a/indra/llmessage/llservice.h +++ b/indra/llmessage/llservice.h @@ -31,72 +31,10 @@ #include #include -//#include -//#include -//#include "llframetimer.h" #include "lliopipe.h" #include "llchainio.h" -#if 0 -class LLServiceCreator; -/** - * intrusive pointer support - */ -namespace boost -{ - void intrusive_ptr_add_ref(LLServiceCreator* p); - void intrusive_ptr_release(LLServiceCreator* p); -}; -#endif - -/** - * @class LLServiceCreator - * @brief This class is an abstract base class for classes which create - * new LLService instances. - * - * Derive classes from this class which appropriately implement the - * operator() and destructor. - * @see LLService - */ -#if 0 -class LLServiceCreator -{ -public: - typedef boost::intrusive_ptr service_t; - virtual ~LLServiceCreator() {} - virtual service_t activate() = 0; - virtual void discard() = 0; - -protected: - LLServiceCreator() : mReferenceCount(0) - { - } - -private: - friend void boost::intrusive_ptr_add_ref(LLServiceCreator* p); - friend void boost::intrusive_ptr_release(LLServiceCreator* p); - U32 mReferenceCount; -}; -#endif - -#if 0 -namespace boost -{ - inline void intrusive_ptr_add_ref(LLServiceCreator* p) - { - ++p->mReferenceCount; - } - inline void intrusive_ptr_release(LLServiceCreator* p) - { - if(p && 0 == --p->mReferenceCount) - { - delete p; - } - } -}; -#endif - /** * @class LLService * @brief This class is the base class for the service classes. @@ -114,8 +52,6 @@ namespace boost class LLService : public LLIOPipe { public: - //typedef boost::intrusive_ptr creator_t; - //typedef boost::intrusive_ptr service_t; typedef std::shared_ptr creator_t; /** diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h index 178b75ab04..2bd64fafd7 100644 --- a/indra/llmessage/llstoredmessage.h +++ b/indra/llmessage/llstoredmessage.h @@ -29,7 +29,6 @@ #include "linden_common.h" #include "llsd.h" -#include #include -- cgit v1.2.3