diff options
author | Callum Prentice <callum@lindenlab.com> | 2023-04-03 14:58:58 -0700 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2023-04-03 14:58:58 -0700 |
commit | 28b240fd7fc39ff4668e37b5aa3bdfe392415b34 (patch) | |
tree | 923892b5ea9e9ac4d757fba089f0e9b2b24fbf26 /indra/llmessage | |
parent | 7b9866791ac7922f7527811bbc99c090f35e4cfd (diff) | |
parent | c7053a6928fd5eafdc935453742e92951ae4e0c1 (diff) |
DRTVWR-489: Fix things up after a messy merge with main because of a gigantic CMake patch. Sadly, my macOS box updated to Xcode14.3 overnight and that caused many warnings/errors with variables being initialized and then used but not in a way that affected anything.. Building on Xcode 14.3 also requires that MACOSX_DEPLOYMENT_TARGET be set to > 10.13. Waiting on a decision about that but checking this in in the meantime. Builds on macOS with appropriate build variables set for MACOSX_DEPLOYMENT_TARGET = 10.14 but not really expecting this to build in TC because (REDACTED). Windows version probably hopelessly broken - switching to that now.
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/CMakeLists.txt | 101 | ||||
-rw-r--r-- | indra/llmessage/llcircuit.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 4 | ||||
-rw-r--r-- | indra/llmessage/llfiltersd2xmlrpc.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llioutil.h | 2 | ||||
-rw-r--r-- | indra/llmessage/llmessagethrottle.cpp | 23 | ||||
-rw-r--r-- | indra/llmessage/llregionflags.h | 2 | ||||
-rw-r--r-- | indra/llmessage/llthrottle.cpp | 6 |
8 files changed, 27 insertions, 119 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index f0a1dfe940..4786956e85 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -7,26 +7,12 @@ include(GoogleMock) include(LLAddBuildTest) include(LLCommon) include(LLCoreHttp) -include(LLMath) -include(LLMessage) -include(LLFileSystem) include(LLAddBuildTest) include(Python) include(Tut) include(Python) include(JsonCpp) -include_directories (${CMAKE_CURRENT_SOURCE_DIR}) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${JSONCPP_INCLUDE_DIR} - ) - set(llmessage_SOURCE_FILES llassetstorage.cpp llavatarname.cpp @@ -197,49 +183,19 @@ set(llmessage_HEADER_FILES sound_ids.h ) -set_source_files_properties(${llmessage_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) add_library (llmessage ${llmessage_SOURCE_FILES}) -if (LINUX) -target_link_libraries( - llmessage - ${CURL_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - rt - ) -else (LINUX) target_link_libraries( - llmessage - ${CURL_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${OPENSSL_LIBRARIES} - ${CRYPTO_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${XMLRPCEPI_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ) -endif(LINUX) + llmessage + llcommon + llfilesystem + llmath + llcorehttp + ll::xmlrpc-epi +) +target_include_directories( llmessage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests if (LL_TESTS) @@ -249,43 +205,18 @@ if (LL_TESTS) lltrustedmessageservice.cpp lltemplatemessagedispatcher.cpp ) + set_property( SOURCE ${llmessage_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES llmath llcorehttp) LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}") - # set(TEST_DEBUG on) - -if (LINUX) - set(test_libs - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${CURL_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - rt - ${GOOGLEMOCK_LIBRARIES} - ) -else (LINUX) + set(test_libs - ${WINDOWS_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLMATH_LIBRARIES} - ${CURL_LIBRARIES} - ${NGHTTP2_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${JSONCPP_LIBRARIES} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${GOOGLEMOCK_LIBRARIES} - ) -endif(LINUX) + llfilesystem + llmath + llcorehttp + llmessage + llcommon + ) #LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}") diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 8baa2e328b..a9a292958f 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -271,7 +271,6 @@ void LLCircuitData::ackReliablePacket(TPACKETID packet_num) S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) { - S32 resent_packets = 0; LLReliablePacket *packetp; @@ -375,7 +374,6 @@ S32 LLCircuitData::resendUnackedPackets(const F64Seconds now) // Don't remove it yet, it still gets to try to resend at least once. ++iter; } - resent_packets++; } else { diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 7031f1aa8c..c8c9280029 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -35,8 +35,8 @@ #include "llsd.h" #include "llsdjson.h" #include "llsdserialize.h" -#include "reader.h" // JSON -#include "writer.h" // JSON +#include "json/reader.h" // JSON +#include "json/writer.h" // JSON #include "llfilesystem.h" #include "message.h" // for getting the port diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index 0abdafbdfc..c63ce5f441 100644 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp @@ -75,7 +75,13 @@ #include <sstream> #include <iterator> + +#ifdef LL_USESYSTEMLIBS +#include <xmlrpc.h> +#else #include <xmlrpc-epi/xmlrpc.h> +#endif + #include "apr_base64.h" #include "llbuffer.h" diff --git a/indra/llmessage/llioutil.h b/indra/llmessage/llioutil.h index e8d245f530..c404a98bed 100644 --- a/indra/llmessage/llioutil.h +++ b/indra/llmessage/llioutil.h @@ -147,7 +147,7 @@ protected: * } * </code> */ -class LLChangeChannel //: public unary_function<T, void> +class LLChangeChannel { public: /** diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 579d6d7187..14582aaf32 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -32,18 +32,8 @@ #include "llframetimer.h" // This is used for the stl search_n function. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n -struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool > -{ - bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const - { - return a.getHash() == b.getHash(); - } -}; -#else bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b) { return a.getHash() == b.getHash(); } -#endif const U64 SEC_TO_USEC = 1000000; @@ -118,14 +108,8 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif if (found == message_list->end()) { // This message was not found. Add it to the list. @@ -152,15 +136,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. -#if _MSC_VER >= 1500 // VC9 has a bug in search_n - // SJB: This *should* work but has not been tested yet *TODO: Test! - message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(), - std::bind2nd(eq_message_throttle_entry(), entry)); -#else message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), 1, entry, eq_message_throttle_entry); -#endif - if (found == message_list->end()) { // This message was not found. Add it to the list. diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index c13f39df9b..8548ed51e7 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -89,6 +89,8 @@ const U64 REGION_FLAGS_ALLOW_VOICE = (1 << 28); const U64 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29); const U64 REGION_FLAGS_DENY_AGEUNVERIFIED = (1 << 30); +const U64 REGION_FLAGS_DENY_BOTS = (1 << 31); + const U64 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK | REGION_FLAGS_ALLOW_SET_HOME | REGION_FLAGS_ALLOW_PARCEL_CHANGES | diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 935af2aa5a..e659414e8c 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -435,12 +435,6 @@ BOOL LLThrottleGroup::dynamicAdjust() { channel_over_nominal[i] = FALSE; } - - //if (total) - //{ - // LL_INFOS() << i << ": B" << channel_busy[i] << " I" << channel_idle[i] << " N" << channel_over_nominal[i]; - // LL_CONT << " Nom: " << mNominalBPS[i] << " Cur: " << mCurrentBPS[i] << " BS: " << mBitsSentHistory[i] << LL_ENDL; - //} } if (channels_busy) |