diff options
Diffstat (limited to 'indra/llmessage')
203 files changed, 254 insertions, 382 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index d98781e9e6..1a90c32fe4 100644..100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -218,6 +218,9 @@ add_library (llmessage ${llmessage_SOURCE_FILES}) target_link_libraries( llmessage ${CURL_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${LLVFS_LIBRARES} + ${LLMATH_LIBRARIES} ${CARES_LIBRARIES} ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES} @@ -243,7 +246,7 @@ if (LL_TESTS) ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} ) LL_ADD_INTEGRATION_TEST( diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp index 5a67035ed1..5a67035ed1 100644..100755 --- a/indra/llmessage/llares.cpp +++ b/indra/llmessage/llares.cpp diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h index 800781ee88..800781ee88 100644..100755 --- a/indra/llmessage/llares.h +++ b/indra/llmessage/llares.h diff --git a/indra/llmessage/llareslistener.cpp b/indra/llmessage/llareslistener.cpp index 58b8a05a9e..58b8a05a9e 100644..100755 --- a/indra/llmessage/llareslistener.cpp +++ b/indra/llmessage/llareslistener.cpp diff --git a/indra/llmessage/llareslistener.h b/indra/llmessage/llareslistener.h index 780dcdd9c5..780dcdd9c5 100644..100755 --- a/indra/llmessage/llareslistener.h +++ b/indra/llmessage/llareslistener.h diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 430c9503ac..430c9503ac 100644..100755 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index 563ff9e077..563ff9e077 100644..100755 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp index a6e2c89ba4..9a68093427 100644..100755 --- a/indra/llmessage/llavatarnamecache.cpp +++ b/indra/llmessage/llavatarnamecache.cpp @@ -43,26 +43,26 @@ namespace LLAvatarNameCache { use_display_name_signal_t mUseDisplayNamesSignal; - // Manual override for display names - can disable even if the region - // supports it. - bool sUseDisplayNames = true; - // Cache starts in a paused state until we can determine if the // current region supports display names. bool sRunning = false; + // Use the People API (modern) for fetching name if true. Use the old legacy protocol if false. + // For testing, there's a UsePeopleAPI setting that can be flipped (must restart viewer). + bool sUsePeopleAPI = true; + // Base lookup URL for name service. // On simulator, loaded from indra.xml // On viewer, usually a simulator capability (at People API team's request) // Includes the trailing slash, like "http://pdp60.lindenlab.com:8000/agents/" std::string sNameLookupURL; - // accumulated agent IDs for next query against service + // Accumulated agent IDs for next query against service typedef std::set<LLUUID> ask_queue_t; ask_queue_t sAskQueue; - // agent IDs that have been requested, but with no reply - // maps agent ID to frame time request was made + // Agent IDs that have been requested, but with no reply. + // Maps agent ID to frame time request was made. typedef std::map<LLUUID, F64> pending_queue_t; pending_queue_t sPendingQueue; @@ -73,21 +73,21 @@ namespace LLAvatarNameCache typedef std::map<LLUUID, callback_signal_t*> signal_map_t; signal_map_t sSignalMap; - // names we know about + // The cache at last, i.e. avatar names we know about. typedef std::map<LLUUID, LLAvatarName> cache_t; cache_t sCache; - // Send bulk lookup requests a few times a second at most - // only need per-frame timing resolution + // Send bulk lookup requests a few times a second at most. + // Only need per-frame timing resolution. LLFrameTimer sRequestTimer; - /// Maximum time an unrefreshed cache entry is allowed + // Maximum time an unrefreshed cache entry is allowed. const F64 MAX_UNREFRESHED_TIME = 20.0 * 60.0; - /// Time when unrefreshed cached names were checked last + // Time when unrefreshed cached names were checked last. static F64 sLastExpireCheck; - /// Time-to-live for a temp cache entry. + // Time-to-live for a temp cache entry. const F64 TEMP_CACHE_ENTRY_LIFETIME = 60.0; //----------------------------------------------------------------------- @@ -95,26 +95,21 @@ namespace LLAvatarNameCache //----------------------------------------------------------------------- // Handle name response off network. - // Optionally skip adding to cache, used when this is a fallback to the - // legacy name system. void processName(const LLUUID& agent_id, - const LLAvatarName& av_name, - bool add_to_cache); + const LLAvatarName& av_name); void requestNamesViaCapability(); - // Legacy name system callback + // Legacy name system callbacks void legacyNameCallback(const LLUUID& agent_id, const std::string& full_name, - bool is_group - ); - + bool is_group); + void legacyNameFetch(const LLUUID& agent_id, + const std::string& full_name, + bool is_group); + void requestNamesViaLegacy(); - // Fill in an LLAvatarName with the legacy name data - void buildLegacyName(const std::string& full_name, - LLAvatarName* av_name); - // Do a single callback to a given slot void fireSignal(const LLUUID& agent_id, const callback_slot_t& slot, @@ -209,20 +204,11 @@ public: // Use expiration time from header av_name.mExpires = expires; - // Some avatars don't have explicit display names set - if (av_name.mDisplayName.empty()) - { - av_name.mDisplayName = av_name.mUsername; - } - - LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result for " << agent_id << " " - << "user '" << av_name.mUsername << "' " - << "display '" << av_name.mDisplayName << "' " - << "expires in " << expires - now << " seconds" - << LL_ENDL; + LL_DEBUGS("AvNameCache") << "LLAvatarNameResponder::result for " << agent_id << LL_ENDL; + av_name.dump(); // cache it and fire signals - LLAvatarNameCache::processName(agent_id, av_name, true); + LLAvatarNameCache::processName(agent_id, av_name); } // Same logic as error response case @@ -279,40 +265,34 @@ void LLAvatarNameCache::handleAgentError(const LLUUID& agent_id) LL_WARNS("AvNameCache") << "LLAvatarNameCache get legacy for agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility - boost::bind(&LLAvatarNameCache::legacyNameCallback, - _1, _2, _3)); + boost::bind(&LLAvatarNameCache::legacyNameFetch, _1, _2, _3)); } else { - // we have a chached (but probably expired) entry - since that would have + // we have a cached (but probably expired) entry - since that would have // been returned by the get method, there is no need to signal anyone // Clear this agent from the pending list LLAvatarNameCache::sPendingQueue.erase(agent_id); LLAvatarName& av_name = existing->second; - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent " - << agent_id - << "user '" << av_name.mUsername << "' " - << "display '" << av_name.mDisplayName << "' " - << "expires in " << av_name.mExpires - LLFrameTimer::getTotalSeconds() << " seconds" - << LL_ENDL; - av_name.mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME; // reset expiry time so we don't constantly rerequest. + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache use cache for agent " << agent_id << LL_ENDL; + av_name.dump(); + + // Reset expiry time so we don't constantly rerequest. + av_name.setExpires(TEMP_CACHE_ENTRY_LIFETIME); } } -void LLAvatarNameCache::processName(const LLUUID& agent_id, - const LLAvatarName& av_name, - bool add_to_cache) +void LLAvatarNameCache::processName(const LLUUID& agent_id, const LLAvatarName& av_name) { - if (add_to_cache) - { - sCache[agent_id] = av_name; - } + // Add to the cache + sCache[agent_id] = av_name; + // Suppress request from the queue sPendingQueue.erase(agent_id); - // signal everyone waiting on this name + // Signal everyone waiting on this name signal_map_t::iterator sig_it = sSignalMap.find(agent_id); if (sig_it != sSignalMap.end()) { @@ -389,22 +369,33 @@ void LLAvatarNameCache::legacyNameCallback(const LLUUID& agent_id, const std::string& full_name, bool is_group) { - // Construct a dummy record for this name. By convention, SLID is blank - // Never expires, but not written to disk, so lasts until end of session. - LLAvatarName av_name; - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::legacyNameCallback " - << "agent " << agent_id << " " + // Put the received data in the cache + legacyNameFetch(agent_id, full_name, is_group); + + // Retrieve the name and set it to never (or almost never...) expire: when we are using the legacy + // protocol, we do not get an expiration date for each name and there's no reason to ask the + // data again and again so we set the expiration time to the largest value admissible. + std::map<LLUUID,LLAvatarName>::iterator av_record = sCache.find(agent_id); + LLAvatarName& av_name = av_record->second; + av_name.setExpires(MAX_UNREFRESHED_TIME); +} + +void LLAvatarNameCache::legacyNameFetch(const LLUUID& agent_id, + const std::string& full_name, + bool is_group) +{ + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::legacyNameFetch " + << "agent " << agent_id << " " << "full name '" << full_name << "'" - << ( is_group ? " [group]" : "" ) - << LL_ENDL; - buildLegacyName(full_name, &av_name); - - // Add to cache, because if we don't we'll keep rerequesting the - // same record forever. buildLegacyName should always guarantee - // that these records expire reasonably soon - // (in TEMP_CACHE_ENTRY_LIFETIME seconds), so if the failure was due - // to something temporary we will eventually request and get the right data. - processName(agent_id, av_name, true); + << ( is_group ? " [group]" : "" ) + << LL_ENDL; + + // Construct an av_name record from this name. + LLAvatarName av_name; + av_name.fromString(full_name); + + // Add to cache: we're still using the new cache even if we're using the old (legacy) protocol. + processName(agent_id, av_name); } void LLAvatarNameCache::requestNamesViaLegacy() @@ -426,25 +417,28 @@ void LLAvatarNameCache::requestNamesViaLegacy() LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::requestNamesViaLegacy agent " << agent_id << LL_ENDL; gCacheName->get(agent_id, false, // legacy compatibility - boost::bind(&LLAvatarNameCache::legacyNameCallback, - _1, _2, _3)); + boost::bind(&LLAvatarNameCache::legacyNameCallback, _1, _2, _3)); } } -void LLAvatarNameCache::initClass(bool running) +void LLAvatarNameCache::initClass(bool running, bool usePeopleAPI) { sRunning = running; + sUsePeopleAPI = usePeopleAPI; } void LLAvatarNameCache::cleanupClass() { + sCache.clear(); } void LLAvatarNameCache::importFile(std::istream& istr) { LLSD data; - S32 parse_count = LLSDSerialize::fromXMLDocument(data, istr); - if (parse_count < 1) return; + if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(data, istr)) + { + return; + } // by convention LLSD storage is a map // we only store one entry in the map @@ -476,7 +470,7 @@ void LLAvatarNameCache::exportFile(std::ostream& ostr) const LLUUID& agent_id = it->first; const LLAvatarName& av_name = it->second; // Do not write temporary or expired entries to the stored cache - if (!av_name.mIsTemporaryName && av_name.mExpires >= max_unrefreshed) + if (av_name.isValidName(max_unrefreshed)) { // key must be a string agents[agent_id.asString()] = av_name.asLLSD(); @@ -497,6 +491,11 @@ bool LLAvatarNameCache::hasNameLookupURL() return !sNameLookupURL.empty(); } +bool LLAvatarNameCache::usePeopleAPI() +{ + return hasNameLookupURL() && sUsePeopleAPI; +} + void LLAvatarNameCache::idle() { // By convention, start running at first idle() call @@ -513,13 +512,12 @@ void LLAvatarNameCache::idle() if (!sAskQueue.empty()) { - if (useDisplayNames()) + if (usePeopleAPI()) { requestNamesViaCapability(); } else { - // ...fall back to legacy name cache system requestNamesViaLegacy(); } } @@ -564,7 +562,7 @@ void LLAvatarNameCache::eraseUnrefreshed() if (av_name.mExpires < max_unrefreshed) { LL_DEBUGS("AvNameCache") << it->first - << " user '" << av_name.mUsername << "' " + << " user '" << av_name.getAccountName() << "' " << "expired " << now - av_name.mExpires << " secs ago" << LL_ENDL; sCache.erase(it++); @@ -578,20 +576,6 @@ void LLAvatarNameCache::eraseUnrefreshed() } } -void LLAvatarNameCache::buildLegacyName(const std::string& full_name, - LLAvatarName* av_name) -{ - llassert(av_name); - av_name->mUsername = ""; - av_name->mDisplayName = full_name; - av_name->mIsDisplayNameDefault = true; - av_name->mIsTemporaryName = true; - av_name->mExpires = LLFrameTimer::getTotalSeconds() + TEMP_CACHE_ENTRY_LIFETIME; - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::buildLegacyName " - << full_name - << LL_ENDL; -} - // fills in av_name if it has it in the cache, even if expired (can check expiry time) // returns bool specifying if av_name was filled, false otherwise bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name) @@ -599,38 +583,24 @@ bool LLAvatarNameCache::get(const LLUUID& agent_id, LLAvatarName *av_name) if (sRunning) { // ...only do immediate lookups when cache is running - if (useDisplayNames()) + std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); + if (it != sCache.end()) { - // ...use display names cache - std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); - if (it != sCache.end()) - { - *av_name = it->second; + *av_name = it->second; - // re-request name if entry is expired - if (av_name->mExpires < LLFrameTimer::getTotalSeconds()) + // re-request name if entry is expired + if (av_name->mExpires < LLFrameTimer::getTotalSeconds()) + { + if (!isRequestPending(agent_id)) { - if (!isRequestPending(agent_id)) - { - LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::get " - << "refresh agent " << agent_id - << LL_ENDL; - sAskQueue.insert(agent_id); - } + LL_DEBUGS("AvNameCache") << "LLAvatarNameCache::get " + << "refresh agent " << agent_id + << LL_ENDL; + sAskQueue.insert(agent_id); } - - return true; - } - } - else - { - // ...use legacy names cache - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) - { - buildLegacyName(full_name, av_name); - return true; } + + return true; } } @@ -661,30 +631,14 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag if (sRunning) { // ...only do immediate lookups when cache is running - if (useDisplayNames()) + std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); + if (it != sCache.end()) { - // ...use new cache - std::map<LLUUID,LLAvatarName>::iterator it = sCache.find(agent_id); - if (it != sCache.end()) - { - const LLAvatarName& av_name = it->second; - - if (av_name.mExpires > LLFrameTimer::getTotalSeconds()) - { - // ...name already exists in cache, fire callback now - fireSignal(agent_id, slot, av_name); - return connection; - } - } - } - else - { - // ...use old name system - std::string full_name; - if (gCacheName->getFullName(agent_id, full_name)) + const LLAvatarName& av_name = it->second; + + if (av_name.mExpires > LLFrameTimer::getTotalSeconds()) { - LLAvatarName av_name; - buildLegacyName(full_name, &av_name); + // ...name already exists in cache, fire callback now fireSignal(agent_id, slot, av_name); return connection; } @@ -719,22 +673,13 @@ LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& ag void LLAvatarNameCache::setUseDisplayNames(bool use) { - if (use != sUseDisplayNames) + if (use != LLAvatarName::useDisplayNames()) { - sUseDisplayNames = use; - // flush our cache - sCache.clear(); - + LLAvatarName::setUseDisplayNames(use); mUseDisplayNamesSignal(); } } -bool LLAvatarNameCache::useDisplayNames() -{ - // Must be both manually set on and able to look up names. - return sUseDisplayNames && !sNameLookupURL.empty(); -} - void LLAvatarNameCache::erase(const LLUUID& agent_id) { sCache.erase(agent_id); diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h index 79f170f7c8..2a8eb46187 100644..100755 --- a/indra/llmessage/llavatarnamecache.h +++ b/indra/llmessage/llavatarnamecache.h @@ -37,33 +37,33 @@ class LLUUID; namespace LLAvatarNameCache { - typedef boost::signals2::signal<void (void)> use_display_name_signal_t; // Until the cache is set running, immediate lookups will fail and // async lookups will be queued. This allows us to block requests // until we know if the first region supports display names. - void initClass(bool running); + void initClass(bool running, bool usePeopleAPI); void cleanupClass(); + // Import/export the name cache to file. void importFile(std::istream& istr); void exportFile(std::ostream& ostr); - // On the viewer, usually a simulator capabilitity - // If empty, name cache will fall back to using legacy name - // lookup system + // On the viewer, usually a simulator capabilitity. + // If empty, name cache will fall back to using legacy name lookup system. void setNameLookupURL(const std::string& name_lookup_url); - // Do we have a valid lookup URL, hence are we trying to use the - // new display name lookup system? + // Do we have a valid lookup URL, i.e. are we trying to use the + // more recent display name lookup system? bool hasNameLookupURL(); + bool usePeopleAPI(); // Periodically makes a batch request for display names not already in - // cache. Call once per frame. + // cache. Called once per frame. void idle(); // If name is in cache, returns true and fills in provided LLAvatarName - // otherwise returns false + // otherwise returns false. bool get(const LLUUID& agent_id, LLAvatarName *av_name); // Callback types for get() below @@ -73,21 +73,19 @@ namespace LLAvatarNameCache typedef callback_signal_t::slot_type callback_slot_t; typedef boost::signals2::connection callback_connection_t; - // Fetches name information and calls callback. - // If name information is in cache, callback will be called immediately. + // Fetches name information and calls callbacks. + // If name information is in cache, callbacks will be called immediately. callback_connection_t get(const LLUUID& agent_id, callback_slot_t slot); - // Allow display names to be explicitly disabled for testing. + // Set display name: flips the switch and triggers the callbacks. void setUseDisplayNames(bool use); - bool useDisplayNames(); - + + void insert(const LLUUID& agent_id, const LLAvatarName& av_name); void erase(const LLUUID& agent_id); - /// Provide some fallback for agents that return errors + /// Provide some fallback for agents that return errors. void handleAgentError(const LLUUID& agent_id); - void insert(const LLUUID& agent_id, const LLAvatarName& av_name); - // Compute name expiration time from HTTP Cache-Control header, // or return default value, in seconds from epoch. F64 nameExpirationFromHeaders(LLSD headers); diff --git a/indra/llmessage/llblowfishcipher.cpp b/indra/llmessage/llblowfishcipher.cpp index 88aaf7c52a..88aaf7c52a 100644..100755 --- a/indra/llmessage/llblowfishcipher.cpp +++ b/indra/llmessage/llblowfishcipher.cpp diff --git a/indra/llmessage/llblowfishcipher.h b/indra/llmessage/llblowfishcipher.h index e2e54526e8..e2e54526e8 100644..100755 --- a/indra/llmessage/llblowfishcipher.h +++ b/indra/llmessage/llblowfishcipher.h diff --git a/indra/llmessage/llbuffer.cpp b/indra/llmessage/llbuffer.cpp index 1722b48f44..1722b48f44 100644..100755 --- a/indra/llmessage/llbuffer.cpp +++ b/indra/llmessage/llbuffer.cpp diff --git a/indra/llmessage/llbuffer.h b/indra/llmessage/llbuffer.h index ccdb9fa7ee..ccdb9fa7ee 100644..100755 --- a/indra/llmessage/llbuffer.h +++ b/indra/llmessage/llbuffer.h diff --git a/indra/llmessage/llbufferstream.cpp b/indra/llmessage/llbufferstream.cpp index a51a48edc3..a51a48edc3 100644..100755 --- a/indra/llmessage/llbufferstream.cpp +++ b/indra/llmessage/llbufferstream.cpp diff --git a/indra/llmessage/llbufferstream.h b/indra/llmessage/llbufferstream.h index 19749612f3..19749612f3 100644..100755 --- a/indra/llmessage/llbufferstream.h +++ b/indra/llmessage/llbufferstream.h diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 8f4af1984c..267c48e1d2 100644..100755 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -308,8 +308,10 @@ boost::signals2::connection LLCacheName::addObserver(const LLCacheNameCallback& bool LLCacheName::importFile(std::istream& istr) { LLSD data; - if(LLSDSerialize::fromXMLDocument(data, istr) < 1) + if(LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXMLDocument(data, istr)) + { return false; + } // We'll expire entries more than a week old U32 now = (U32)time(NULL); @@ -523,6 +525,7 @@ std::string LLCacheName::cleanFullName(const std::string& full_name) } //static +// Transform hard-coded name provided by server to a more legible username std::string LLCacheName::buildUsername(const std::string& full_name) { // rare, but handle hard-coded error names returned from server @@ -548,8 +551,9 @@ std::string LLCacheName::buildUsername(const std::string& full_name) return username; } - // if the input wasn't a correctly formatted legacy name just return it unchanged - return full_name; + // if the input wasn't a correctly formatted legacy name, just return it + // cleaned up from a potential terminal "Resident" + return cleanFullName(full_name); } //static diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h index b108e37157..d238c3a247 100644..100755 --- a/indra/llmessage/llcachename.h +++ b/indra/llmessage/llcachename.h @@ -40,7 +40,7 @@ typedef boost::signals2::signal<void (const LLUUID& id, bool is_group)> LLCacheNameSignal; typedef LLCacheNameSignal::slot_type LLCacheNameCallback; -// Old callback with user data for compatability +// Old callback with user data for compatibility typedef void (*old_callback_t)(const LLUUID&, const std::string&, bool, void*); // Here's the theory: diff --git a/indra/llmessage/llchainio.cpp b/indra/llmessage/llchainio.cpp index bcda6746a1..bcda6746a1 100644..100755 --- a/indra/llmessage/llchainio.cpp +++ b/indra/llmessage/llchainio.cpp diff --git a/indra/llmessage/llchainio.h b/indra/llmessage/llchainio.h index 6e4d6c2013..6e4d6c2013 100644..100755 --- a/indra/llmessage/llchainio.h +++ b/indra/llmessage/llchainio.h diff --git a/indra/llmessage/llcipher.h b/indra/llmessage/llcipher.h index 76e3a7a5a3..76e3a7a5a3 100644..100755 --- a/indra/llmessage/llcipher.h +++ b/indra/llmessage/llcipher.h diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index 0c2d4b823d..0c2d4b823d 100644..100755 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 430d6358f7..430d6358f7 100644..100755 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h diff --git a/indra/llmessage/llclassifiedflags.cpp b/indra/llmessage/llclassifiedflags.cpp index f6084d4a60..f6084d4a60 100644..100755 --- a/indra/llmessage/llclassifiedflags.cpp +++ b/indra/llmessage/llclassifiedflags.cpp diff --git a/indra/llmessage/llclassifiedflags.h b/indra/llmessage/llclassifiedflags.h index 17fc867453..17fc867453 100644..100755 --- a/indra/llmessage/llclassifiedflags.h +++ b/indra/llmessage/llclassifiedflags.h diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 8ffa8e4271..47041a2880 100644..100755 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -175,9 +175,11 @@ void LLCurl::Responder::completedRaw( { LLSD content; LLBufferStream istr(channels, buffer.get()); - if (!LLSDSerialize::fromXML(content, istr)) + const bool emit_errors = false; + if (LLSDParser::PARSE_FAILURE == LLSDSerialize::fromXML(content, istr, emit_errors)) { llinfos << "Failed to deserialize LLSD. " << mURL << " [" << status << "]: " << reason << llendl; + content["reason"] = reason; } completed(status, reason, content); diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h index 7bcf61e233..7bcf61e233 100644..100755 --- a/indra/llmessage/llcurl.h +++ b/indra/llmessage/llcurl.h diff --git a/indra/llmessage/lldatapacker.cpp b/indra/llmessage/lldatapacker.cpp index 3385d7c2e2..3385d7c2e2 100644..100755 --- a/indra/llmessage/lldatapacker.cpp +++ b/indra/llmessage/lldatapacker.cpp diff --git a/indra/llmessage/lldatapacker.h b/indra/llmessage/lldatapacker.h index 226752d52e..226752d52e 100644..100755 --- a/indra/llmessage/lldatapacker.h +++ b/indra/llmessage/lldatapacker.h diff --git a/indra/llmessage/lldbstrings.h b/indra/llmessage/lldbstrings.h index 9bf1b3eda4..e23d17d5b6 100644..100755 --- a/indra/llmessage/lldbstrings.h +++ b/indra/llmessage/lldbstrings.h @@ -156,18 +156,6 @@ const S32 DB_USER_SKILLS_BUF_SIZE = 255; const S32 DB_NV_NAME_STR_LEN = 128; const S32 DB_NV_NAME_BUF_SIZE = 129; -// votes.vote_text varchar(254) -const S32 DB_VOTE_TEXT_STR_LEN = 254; -const S32 DB_VOTE_TEXT_BUF_SIZE = 255; - -// vpte type text varchar(9) -const S32 DB_VOTE_TYPE_STR_LEN = 9; -const S32 DB_VOTE_TYPE_BUF_SIZE = 10; - -// vote result text -const S32 DB_VOTE_RESULT_BUF_LEN = 8; -const S32 DB_VOTE_RESULT_BUF_SIZE = 9; - // user_start_location.location_name varchar(254) const S32 DB_START_LOCATION_STR_LEN = 254; const S32 DB_START_LOCATION_BUF_SIZE = 255; diff --git a/indra/llmessage/lldispatcher.cpp b/indra/llmessage/lldispatcher.cpp index 7ac3651a76..7ac3651a76 100644..100755 --- a/indra/llmessage/lldispatcher.cpp +++ b/indra/llmessage/lldispatcher.cpp diff --git a/indra/llmessage/lldispatcher.h b/indra/llmessage/lldispatcher.h index 9d1751f588..9d1751f588 100644..100755 --- a/indra/llmessage/lldispatcher.h +++ b/indra/llmessage/lldispatcher.h diff --git a/indra/llmessage/lleventflags.h b/indra/llmessage/lleventflags.h index 75d79071b1..75d79071b1 100644..100755 --- a/indra/llmessage/lleventflags.h +++ b/indra/llmessage/lleventflags.h diff --git a/indra/llmessage/llfiltersd2xmlrpc.cpp b/indra/llmessage/llfiltersd2xmlrpc.cpp index dbb8c4e28d..dbb8c4e28d 100644..100755 --- a/indra/llmessage/llfiltersd2xmlrpc.cpp +++ b/indra/llmessage/llfiltersd2xmlrpc.cpp diff --git a/indra/llmessage/llfiltersd2xmlrpc.h b/indra/llmessage/llfiltersd2xmlrpc.h index 0c9a0dc95b..0c9a0dc95b 100644..100755 --- a/indra/llmessage/llfiltersd2xmlrpc.h +++ b/indra/llmessage/llfiltersd2xmlrpc.h diff --git a/indra/llmessage/llfollowcamparams.h b/indra/llmessage/llfollowcamparams.h index 25208031db..25208031db 100644..100755 --- a/indra/llmessage/llfollowcamparams.h +++ b/indra/llmessage/llfollowcamparams.h diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index 61a84de8e3..61a84de8e3 100644..100755 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp diff --git a/indra/llmessage/llhost.h b/indra/llmessage/llhost.h index 0cf52a4151..0cf52a4151 100644..100755 --- a/indra/llmessage/llhost.h +++ b/indra/llmessage/llhost.h diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index d6ed08055e..7dcf160c9b 100644..100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -747,9 +747,9 @@ LLAssetRequest* LLHTTPAssetStorage::findNextRequest(LLAssetStorage::request_list request_list_t::iterator running_end = running.end(); request_list_t::iterator pending_iter = pending.begin(); - request_list_t::iterator pending_end = pending.end(); + // Loop over all pending requests until we miss finding it in the running list. - for (; pending_iter != pending_end; ++pending_iter) + for (; pending_iter != pending.end(); ++pending_iter) { LLAssetRequest* req = *pending_iter; // Look for this pending request in the running list. diff --git a/indra/llmessage/llhttpassetstorage.h b/indra/llmessage/llhttpassetstorage.h index f743ccf0ac..f743ccf0ac 100644..100755 --- a/indra/llmessage/llhttpassetstorage.h +++ b/indra/llmessage/llhttpassetstorage.h diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp index 0c325a68aa..3561459bb4 100644..100755 --- a/indra/llmessage/llhttpclient.cpp +++ b/indra/llmessage/llhttpclient.cpp @@ -222,7 +222,11 @@ static void request( { if (!LLHTTPClient::hasPump()) { - responder->completed(U32_MAX, "No pump", LLSD()); + if (responder) + { + responder->completed(U32_MAX, "No pump", LLSD()); + } + delete body_injector; return; } LLPumpIO::chain_t chain; @@ -230,8 +234,13 @@ static void request( LLURLRequest* req = new LLURLRequest(method, url); if(!req->isValid())//failed { - delete req ; - return ; + if (responder) + { + responder->completed(498, "Internal Error - curl failure", LLSD()); + } + delete req; + delete body_injector; + return; } req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req); diff --git a/indra/llmessage/llhttpclient.h b/indra/llmessage/llhttpclient.h index a7236ba169..a7236ba169 100644..100755 --- a/indra/llmessage/llhttpclient.h +++ b/indra/llmessage/llhttpclient.h diff --git a/indra/llmessage/llhttpclientadapter.cpp b/indra/llmessage/llhttpclientadapter.cpp index f5d7a9abb6..0b59209af1 100644..100755 --- a/indra/llmessage/llhttpclientadapter.cpp +++ b/indra/llmessage/llhttpclientadapter.cpp @@ -43,8 +43,11 @@ void LLHTTPClientAdapter::get(const std::string& url, LLCurl::ResponderPtr respo void LLHTTPClientAdapter::get(const std::string& url, LLCurl::ResponderPtr responder, const LLSD& headers) { LLSD empty_pragma_header = headers; - // as above - empty_pragma_header["Pragma"] = " "; + if (!empty_pragma_header.has("Pragma")) + { + // as above + empty_pragma_header["Pragma"] = " "; + } LLHTTPClient::get(url, responder, empty_pragma_header); } diff --git a/indra/llmessage/llhttpclientadapter.h b/indra/llmessage/llhttpclientadapter.h index aae6426a59..aae6426a59 100644..100755 --- a/indra/llmessage/llhttpclientadapter.h +++ b/indra/llmessage/llhttpclientadapter.h diff --git a/indra/llmessage/llhttpclientinterface.h b/indra/llmessage/llhttpclientinterface.h index 12a3857a61..12a3857a61 100644..100755 --- a/indra/llmessage/llhttpclientinterface.h +++ b/indra/llmessage/llhttpclientinterface.h diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp index 5c2f73eccb..5c2f73eccb 100644..100755 --- a/indra/llmessage/llhttpnode.cpp +++ b/indra/llmessage/llhttpnode.cpp diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h index 148647ddde..148647ddde 100644..100755 --- a/indra/llmessage/llhttpnode.h +++ b/indra/llmessage/llhttpnode.h diff --git a/indra/llmessage/llhttpnodeadapter.h b/indra/llmessage/llhttpnodeadapter.h index 22984c4478..22984c4478 100644..100755 --- a/indra/llmessage/llhttpnodeadapter.h +++ b/indra/llmessage/llhttpnodeadapter.h diff --git a/indra/llmessage/llhttpsender.cpp b/indra/llmessage/llhttpsender.cpp index c48cbc42a6..c48cbc42a6 100644..100755 --- a/indra/llmessage/llhttpsender.cpp +++ b/indra/llmessage/llhttpsender.cpp diff --git a/indra/llmessage/llhttpsender.h b/indra/llmessage/llhttpsender.h index 88920db24d..88920db24d 100644..100755 --- a/indra/llmessage/llhttpsender.h +++ b/indra/llmessage/llhttpsender.h diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp index d68e0c423e..b0275c161b 100644..100755 --- a/indra/llmessage/llinstantmessage.cpp +++ b/indra/llmessage/llinstantmessage.cpp @@ -43,14 +43,6 @@ const U8 IM_ONLINE = 0; const U8 IM_OFFLINE = 1; -const S32 VOTE_YES = 1; -const S32 VOTE_NO = 0; -const S32 VOTE_ABSTAIN = -1; - -const S32 VOTE_MAJORITY = 0; -const S32 VOTE_SUPER_MAJORITY = 1; -const S32 VOTE_UNANIMOUS = 2; - const char EMPTY_BINARY_BUCKET[] = ""; const S32 EMPTY_BINARY_BUCKET_SIZE = 1; const U32 NO_TIMESTAMP = 0; @@ -69,7 +61,6 @@ LLIMInfo::LLIMInfo() : mViewerThinksToIsOnline(false), mIMType(IM_NOTHING_SPECIAL), mTimeStamp(0), - mSource(IM_FROM_SIM), mTTL(IM_TTL) { } @@ -88,7 +79,6 @@ LLIMInfo::LLIMInfo( LLSD data, U8 offline, U32 timestamp, - EIMSource source, S32 ttl) : mFromID(from_id), mFromGroup(from_group), @@ -104,14 +94,12 @@ LLIMInfo::LLIMInfo( mName(name), mMessage(message), mData(data), - mSource(source), mTTL(ttl) { } -LLIMInfo::LLIMInfo(LLMessageSystem* msg, EIMSource source, S32 ttl) : +LLIMInfo::LLIMInfo(LLMessageSystem* msg, S32 ttl) : mViewerThinksToIsOnline(false), - mSource(source), mTTL(ttl) { unpackMessageBlock(msg); @@ -326,7 +314,6 @@ LLSD im_info_to_llsd(LLPointer<LLIMInfo> im_info) param_message["region_id"] = im_info->mRegionID; param_message["position"] = ll_sd_from_vector3(im_info->mPosition); param_message["data"] = im_info->mData; - param_message["source"]= im_info->mSource; param_message["ttl"] = im_info->mTTL; LLSD param_agent; @@ -359,7 +346,6 @@ LLPointer<LLIMInfo> llsd_to_im_info(const LLSD& im_info_sd) param_message["data"], (U8) param_message["offline"].asInteger(), (U32) param_message["timestamp"].asInteger(), - (EIMSource)param_message["source"].asInteger(), param_message["ttl"].asInteger()); return im_info; @@ -381,7 +367,6 @@ LLPointer<LLIMInfo> LLIMInfo::clone() mData, mOffline, mTimeStamp, - mSource, mTTL); } diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h index e0dae376b4..db4a38ea9e 100644..100755 --- a/indra/llmessage/llinstantmessage.h +++ b/indra/llmessage/llinstantmessage.h @@ -115,8 +115,8 @@ enum EInstantMessage // viewer, since you can't IM an object yet. IM_FROM_TASK = 19, - // sent an IM to a busy user, this is the auto response - IM_BUSY_AUTO_RESPONSE = 20, + // sent an IM to a do not disturb user, this is the auto response + IM_DO_NOT_DISTURB_AUTO_RESPONSE = 20, // Shows the message in the console and chat history IM_CONSOLE_AND_CHAT_HISTORY = 21, @@ -164,57 +164,9 @@ enum EInstantMessage }; -// Hooks for quickly hacking in experimental admin debug messages -// without needing to recompile the viewer -// *NOTE: This functionality has been moved to be a string based -// operation so that we don't even have to do a full recompile. This -// enumeration will be phased out soon. -enum EGodlikeRequest -{ - GOD_WANTS_NOTHING, - - // for requesting physics information about an object - GOD_WANTS_PHYSICS_INFO, - - // two unused requests that can be appropriated for debug - // purposes (no viewer recompile necessary) - GOD_WANTS_FOO, - GOD_WANTS_BAR, - - // to dump simulator terrain data to terrain.raw file - GOD_WANTS_TERRAIN_SAVE, - // to load simulator terrain data from terrain.raw file - GOD_WANTS_TERRAIN_LOAD, - - GOD_WANTS_TOGGLE_AVATAR_GEOMETRY, // HACK for testing new avatar geom - - // real-time telehub operations - GOD_WANTS_TELEHUB_INFO, - GOD_WANTS_CONNECT_TELEHUB, - GOD_WANTS_DELETE_TELEHUB, - GOD_WANTS_ADD_TELEHUB_SPAWNPOINT, - GOD_WANTS_REMOVE_TELEHUB_SPAWNPOINT, - -}; - -enum EIMSource -{ - IM_FROM_VIEWER, - IM_FROM_DATASERVER, - IM_FROM_SIM -}; - extern const U8 IM_ONLINE; extern const U8 IM_OFFLINE; -extern const S32 VOTE_YES; -extern const S32 VOTE_NO; -extern const S32 VOTE_ABSTAIN; - -extern const S32 VOTE_MAJORITY; -extern const S32 VOTE_SUPER_MAJORITY; -extern const S32 VOTE_UNANIMOUS; - extern const char EMPTY_BINARY_BUCKET[]; extern const S32 EMPTY_BINARY_BUCKET_SIZE; @@ -234,7 +186,6 @@ protected: public: LLIMInfo(LLMessageSystem* msg, - EIMSource source = IM_FROM_SIM, S32 ttl = IM_TTL); LLIMInfo( @@ -251,7 +202,6 @@ public: LLSD data, U8 offline, U32 timestamp, - EIMSource source, S32 ttl = IM_TTL); void packInstantMessage(LLMessageSystem* msg) const; @@ -274,7 +224,6 @@ public: std::string mMessage; LLSD mData; - EIMSource mSource; S32 mTTL; }; diff --git a/indra/llmessage/llinvite.h b/indra/llmessage/llinvite.h index e5d573c1e3..e5d573c1e3 100644..100755 --- a/indra/llmessage/llinvite.h +++ b/indra/llmessage/llinvite.h diff --git a/indra/llmessage/lliobuffer.cpp b/indra/llmessage/lliobuffer.cpp index ed00e230ac..ed00e230ac 100644..100755 --- a/indra/llmessage/lliobuffer.cpp +++ b/indra/llmessage/lliobuffer.cpp diff --git a/indra/llmessage/lliobuffer.h b/indra/llmessage/lliobuffer.h index 3349848947..3349848947 100644..100755 --- a/indra/llmessage/lliobuffer.h +++ b/indra/llmessage/lliobuffer.h diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp index f9d37b2e39..f9d37b2e39 100644..100755 --- a/indra/llmessage/lliohttpserver.cpp +++ b/indra/llmessage/lliohttpserver.cpp diff --git a/indra/llmessage/lliohttpserver.h b/indra/llmessage/lliohttpserver.h index 5c1b0531ff..5c1b0531ff 100644..100755 --- a/indra/llmessage/lliohttpserver.h +++ b/indra/llmessage/lliohttpserver.h diff --git a/indra/llmessage/lliopipe.cpp b/indra/llmessage/lliopipe.cpp index 8f827f7a30..8f827f7a30 100644..100755 --- a/indra/llmessage/lliopipe.cpp +++ b/indra/llmessage/lliopipe.cpp diff --git a/indra/llmessage/lliopipe.h b/indra/llmessage/lliopipe.h index 9a0a427efd..9a0a427efd 100644..100755 --- a/indra/llmessage/lliopipe.h +++ b/indra/llmessage/lliopipe.h diff --git a/indra/llmessage/lliosocket.cpp b/indra/llmessage/lliosocket.cpp index 1383d37f41..27e3cc7898 100644..100755 --- a/indra/llmessage/lliosocket.cpp +++ b/indra/llmessage/lliosocket.cpp @@ -593,6 +593,15 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( PUMP_DEBUG; apr_pool_t* new_pool = NULL; apr_status_t status = apr_pool_create(&new_pool, mPool); + if(ll_apr_warn_status(status)) + { + if(new_pool) + { + apr_pool_destroy(new_pool); + } + return STATUS_ERROR; + } + apr_socket_t* socket = NULL; status = apr_socket_accept( &socket, diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h index ec998552d0..ec998552d0 100644..100755 --- a/indra/llmessage/lliosocket.h +++ b/indra/llmessage/lliosocket.h diff --git a/indra/llmessage/llioutil.cpp b/indra/llmessage/llioutil.cpp index 9fd49d23d4..9fd49d23d4 100644..100755 --- a/indra/llmessage/llioutil.cpp +++ b/indra/llmessage/llioutil.cpp diff --git a/indra/llmessage/llioutil.h b/indra/llmessage/llioutil.h index e8d245f530..e8d245f530 100644..100755 --- a/indra/llmessage/llioutil.h +++ b/indra/llmessage/llioutil.h diff --git a/indra/llmessage/llloginflags.h b/indra/llmessage/llloginflags.h index 45833fc914..45833fc914 100644..100755 --- a/indra/llmessage/llloginflags.h +++ b/indra/llmessage/llloginflags.h diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index dc27f2ca4a..dc27f2ca4a 100644..100755 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp diff --git a/indra/llmessage/llmail.h b/indra/llmessage/llmail.h index 3791714363..3791714363 100644..100755 --- a/indra/llmessage/llmail.h +++ b/indra/llmessage/llmail.h diff --git a/indra/llmessage/llmessagebuilder.cpp b/indra/llmessage/llmessagebuilder.cpp index e2ed968a57..e2ed968a57 100644..100755 --- a/indra/llmessage/llmessagebuilder.cpp +++ b/indra/llmessage/llmessagebuilder.cpp diff --git a/indra/llmessage/llmessagebuilder.h b/indra/llmessage/llmessagebuilder.h index bf5be929f2..bf5be929f2 100644..100755 --- a/indra/llmessage/llmessagebuilder.h +++ b/indra/llmessage/llmessagebuilder.h diff --git a/indra/llmessage/llmessageconfig.cpp b/indra/llmessage/llmessageconfig.cpp index 539efc65f8..539efc65f8 100644..100755 --- a/indra/llmessage/llmessageconfig.cpp +++ b/indra/llmessage/llmessageconfig.cpp diff --git a/indra/llmessage/llmessageconfig.h b/indra/llmessage/llmessageconfig.h index 1b39c386ca..1b39c386ca 100644..100755 --- a/indra/llmessage/llmessageconfig.h +++ b/indra/llmessage/llmessageconfig.h diff --git a/indra/llmessage/llmessagereader.cpp b/indra/llmessage/llmessagereader.cpp index 1d1bee7f59..1d1bee7f59 100644..100755 --- a/indra/llmessage/llmessagereader.cpp +++ b/indra/llmessage/llmessagereader.cpp diff --git a/indra/llmessage/llmessagereader.h b/indra/llmessage/llmessagereader.h index 3b77a6bfe4..3b77a6bfe4 100644..100755 --- a/indra/llmessage/llmessagereader.h +++ b/indra/llmessage/llmessagereader.h diff --git a/indra/llmessage/llmessagesenderinterface.h b/indra/llmessage/llmessagesenderinterface.h index ac0f9f7edb..ac0f9f7edb 100644..100755 --- a/indra/llmessage/llmessagesenderinterface.h +++ b/indra/llmessage/llmessagesenderinterface.h diff --git a/indra/llmessage/llmessagetemplate.cpp b/indra/llmessage/llmessagetemplate.cpp index d64123ad62..d64123ad62 100644..100755 --- a/indra/llmessage/llmessagetemplate.cpp +++ b/indra/llmessage/llmessagetemplate.cpp diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index ae8e0087c1..ae8e0087c1 100644..100755 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index b0f19df47c..b0f19df47c 100644..100755 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp diff --git a/indra/llmessage/llmessagetemplateparser.h b/indra/llmessage/llmessagetemplateparser.h index 372a2b292d..372a2b292d 100644..100755 --- a/indra/llmessage/llmessagetemplateparser.h +++ b/indra/llmessage/llmessagetemplateparser.h diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index 579d6d7187..579d6d7187 100644..100755 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp diff --git a/indra/llmessage/llmessagethrottle.h b/indra/llmessage/llmessagethrottle.h index 4ea84f712a..4ea84f712a 100644..100755 --- a/indra/llmessage/llmessagethrottle.h +++ b/indra/llmessage/llmessagethrottle.h diff --git a/indra/llmessage/llmime.cpp b/indra/llmessage/llmime.cpp index 9d9c4ebd68..9d9c4ebd68 100644..100755 --- a/indra/llmessage/llmime.cpp +++ b/indra/llmessage/llmime.cpp diff --git a/indra/llmessage/llmime.h b/indra/llmessage/llmime.h index e6617fb503..e6617fb503 100644..100755 --- a/indra/llmessage/llmime.h +++ b/indra/llmessage/llmime.h diff --git a/indra/llmessage/llmsgvariabletype.h b/indra/llmessage/llmsgvariabletype.h index c4de822b46..c4de822b46 100644..100755 --- a/indra/llmessage/llmsgvariabletype.h +++ b/indra/llmessage/llmsgvariabletype.h diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index d799403029..d799403029 100644..100755 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h index 273de475f8..273de475f8 100644..100755 --- a/indra/llmessage/llnamevalue.h +++ b/indra/llmessage/llnamevalue.h diff --git a/indra/llmessage/llnullcipher.cpp b/indra/llmessage/llnullcipher.cpp index b32e7e6fa6..b32e7e6fa6 100644..100755 --- a/indra/llmessage/llnullcipher.cpp +++ b/indra/llmessage/llnullcipher.cpp diff --git a/indra/llmessage/llnullcipher.h b/indra/llmessage/llnullcipher.h index a9f9a1ce03..a9f9a1ce03 100644..100755 --- a/indra/llmessage/llnullcipher.h +++ b/indra/llmessage/llnullcipher.h diff --git a/indra/llmessage/llpacketack.cpp b/indra/llmessage/llpacketack.cpp index f08d3404ea..f08d3404ea 100644..100755 --- a/indra/llmessage/llpacketack.cpp +++ b/indra/llmessage/llpacketack.cpp diff --git a/indra/llmessage/llpacketack.h b/indra/llmessage/llpacketack.h index 2ef3c48e44..2ef3c48e44 100644..100755 --- a/indra/llmessage/llpacketack.h +++ b/indra/llmessage/llpacketack.h diff --git a/indra/llmessage/llpacketbuffer.cpp b/indra/llmessage/llpacketbuffer.cpp index e69631eb3b..e69631eb3b 100644..100755 --- a/indra/llmessage/llpacketbuffer.cpp +++ b/indra/llmessage/llpacketbuffer.cpp diff --git a/indra/llmessage/llpacketbuffer.h b/indra/llmessage/llpacketbuffer.h index 14b6f9d5d2..14b6f9d5d2 100644..100755 --- a/indra/llmessage/llpacketbuffer.h +++ b/indra/llmessage/llpacketbuffer.h diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index fc6e9c5193..fc6e9c5193 100644..100755 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h index b214271e78..b214271e78 100644..100755 --- a/indra/llmessage/llpacketring.h +++ b/indra/llmessage/llpacketring.h diff --git a/indra/llmessage/llpartdata.cpp b/indra/llmessage/llpartdata.cpp index 26cafa025f..26cafa025f 100644..100755 --- a/indra/llmessage/llpartdata.cpp +++ b/indra/llmessage/llpartdata.cpp diff --git a/indra/llmessage/llpartdata.h b/indra/llmessage/llpartdata.h index a4ef058b30..a4ef058b30 100644..100755 --- a/indra/llmessage/llpartdata.h +++ b/indra/llmessage/llpartdata.h diff --git a/indra/llmessage/llproxy.cpp b/indra/llmessage/llproxy.cpp index 9b8d19cc3e..9b8d19cc3e 100644..100755 --- a/indra/llmessage/llproxy.cpp +++ b/indra/llmessage/llproxy.cpp diff --git a/indra/llmessage/llproxy.h b/indra/llmessage/llproxy.h index a919370540..a919370540 100644..100755 --- a/indra/llmessage/llproxy.h +++ b/indra/llmessage/llproxy.h diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp index e3f09f34ee..e3f09f34ee 100644..100755 --- a/indra/llmessage/llpumpio.cpp +++ b/indra/llmessage/llpumpio.cpp diff --git a/indra/llmessage/llpumpio.h b/indra/llmessage/llpumpio.h index d2c5d37571..d2c5d37571 100644..100755 --- a/indra/llmessage/llpumpio.h +++ b/indra/llmessage/llpumpio.h diff --git a/indra/llmessage/llqueryflags.h b/indra/llmessage/llqueryflags.h index 14a62de04f..14a62de04f 100644..100755 --- a/indra/llmessage/llqueryflags.h +++ b/indra/llmessage/llqueryflags.h diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index 7b796a0fa8..1cf940918b 100644..100755 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -28,95 +28,98 @@ #define LL_LLREGIONFLAGS_H // Can you be hurt here? Should health be on? -const U32 REGION_FLAGS_ALLOW_DAMAGE = (1 << 0); +const U64 REGION_FLAGS_ALLOW_DAMAGE = (1 << 0); // Can you make landmarks here? -const U32 REGION_FLAGS_ALLOW_LANDMARK = (1 << 1); +const U64 REGION_FLAGS_ALLOW_LANDMARK = (1 << 1); // Do we reset the home position when someone teleports away from here? -const U32 REGION_FLAGS_ALLOW_SET_HOME = (1 << 2); +const U64 REGION_FLAGS_ALLOW_SET_HOME = (1 << 2); // Do we reset the home position when someone teleports away from here? -const U32 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3); +const U64 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3); // Does the sun move? -const U32 REGION_FLAGS_SUN_FIXED = (1 << 4); +const U64 REGION_FLAGS_SUN_FIXED = (1 << 4); // Can't change the terrain heightfield, even on owned parcels, // but can plant trees and grass. -const U32 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6); +const U64 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6); // Can't release, sell, or buy land. -const U32 REGION_FLAGS_BLOCK_LAND_RESELL = (1 << 7); +const U64 REGION_FLAGS_BLOCK_LAND_RESELL = (1 << 7); // All content wiped once per night -const U32 REGION_FLAGS_SANDBOX = (1 << 8); -const U32 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies -const U32 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13); -const U32 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics -const U32 REGION_FLAGS_EXTERNALLY_VISIBLE = (1 << 15); -const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT = (1 << 16); -const U32 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT = (1 << 17); -const U32 REGION_FLAGS_BLOCK_DWELL = (1 << 18); +const U64 REGION_FLAGS_SANDBOX = (1 << 8); +const U64 REGION_FLAGS_SKIP_COLLISIONS = (1 << 12); // Pin all non agent rigid bodies +const U64 REGION_FLAGS_SKIP_SCRIPTS = (1 << 13); +const U64 REGION_FLAGS_SKIP_PHYSICS = (1 << 14); // Skip all physics +const U64 REGION_FLAGS_EXTERNALLY_VISIBLE = (1 << 15); +const U64 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_OBJECT = (1 << 16); +const U64 REGION_FLAGS_ALLOW_RETURN_ENCROACHING_ESTATE_OBJECT = (1 << 17); +const U64 REGION_FLAGS_BLOCK_DWELL = (1 << 18); // Is flight allowed? -const U32 REGION_FLAGS_BLOCK_FLY = (1 << 19); +const U64 REGION_FLAGS_BLOCK_FLY = (1 << 19); // Is direct teleport (p2p) allowed? -const U32 REGION_FLAGS_ALLOW_DIRECT_TELEPORT = (1 << 20); +const U64 REGION_FLAGS_ALLOW_DIRECT_TELEPORT = (1 << 20); // Is there an administrative override on scripts in the region at the // moment. This is the similar skip scripts, except this flag is // presisted in the database on an estate level. -const U32 REGION_FLAGS_ESTATE_SKIP_SCRIPTS = (1 << 21); +const U64 REGION_FLAGS_ESTATE_SKIP_SCRIPTS = (1 << 21); -const U32 REGION_FLAGS_RESTRICT_PUSHOBJECT = (1 << 22); +const U64 REGION_FLAGS_RESTRICT_PUSHOBJECT = (1 << 22); -const U32 REGION_FLAGS_DENY_ANONYMOUS = (1 << 23); +const U64 REGION_FLAGS_DENY_ANONYMOUS = (1 << 23); -const U32 REGION_FLAGS_ALLOW_PARCEL_CHANGES = (1 << 26); +const U64 REGION_FLAGS_ALLOW_PARCEL_CHANGES = (1 << 26); -const U32 REGION_FLAGS_ALLOW_VOICE = (1 << 28); +const U64 REGION_FLAGS_ALLOW_VOICE = (1 << 28); -const U32 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29); -const U32 REGION_FLAGS_DENY_AGEUNVERIFIED = (1 << 30); +const U64 REGION_FLAGS_BLOCK_PARCEL_SEARCH = (1 << 29); +const U64 REGION_FLAGS_DENY_AGEUNVERIFIED = (1 << 30); -const U32 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK | +const U64 REGION_FLAGS_DEFAULT = REGION_FLAGS_ALLOW_LANDMARK | REGION_FLAGS_ALLOW_SET_HOME | REGION_FLAGS_ALLOW_PARCEL_CHANGES | REGION_FLAGS_ALLOW_VOICE; -const U32 REGION_FLAGS_PRELUDE_SET = REGION_FLAGS_RESET_HOME_ON_TELEPORT; -const U32 REGION_FLAGS_PRELUDE_UNSET = REGION_FLAGS_ALLOW_LANDMARK +const U64 REGION_FLAGS_PRELUDE_SET = REGION_FLAGS_RESET_HOME_ON_TELEPORT; +const U64 REGION_FLAGS_PRELUDE_UNSET = REGION_FLAGS_ALLOW_LANDMARK | REGION_FLAGS_ALLOW_SET_HOME; -const U32 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE +const U64 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE | REGION_FLAGS_SUN_FIXED | REGION_FLAGS_DENY_ANONYMOUS | REGION_FLAGS_DENY_AGEUNVERIFIED; -inline BOOL is_prelude( U32 flags ) +inline BOOL is_prelude( U64 flags ) { // definition of prelude does not depend on fixed-sun return 0 == (flags & REGION_FLAGS_PRELUDE_UNSET) && 0 != (flags & REGION_FLAGS_PRELUDE_SET); } -inline U32 set_prelude_flags(U32 flags) +inline U64 set_prelude_flags(U64 flags) { // also set the sun-fixed flag return ((flags & ~REGION_FLAGS_PRELUDE_UNSET) | (REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED)); } -inline U32 unset_prelude_flags(U32 flags) +inline U64 unset_prelude_flags(U64 flags) { // also unset the fixed-sun flag return ((flags | REGION_FLAGS_PRELUDE_UNSET) & ~(REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED)); } +// Region protocols +const U64 REGION_PROTOCOLS_AGENT_APPEARANCE_SERVICE = (1 << 0); + // estate constants. Need to match first few etries in indra.estate table. const U32 ESTATE_ALL = 0; // will not match in db, reserved key for logic const U32 ESTATE_MAINLAND = 1; diff --git a/indra/llmessage/llregionhandle.h b/indra/llmessage/llregionhandle.h index c77794e4b8..c77794e4b8 100644..100755 --- a/indra/llmessage/llregionhandle.h +++ b/indra/llmessage/llregionhandle.h diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp index 932cbf375e..932cbf375e 100644..100755 --- a/indra/llmessage/llregionpresenceverifier.cpp +++ b/indra/llmessage/llregionpresenceverifier.cpp diff --git a/indra/llmessage/llregionpresenceverifier.h b/indra/llmessage/llregionpresenceverifier.h index 5e8251e519..5e8251e519 100644..100755 --- a/indra/llmessage/llregionpresenceverifier.h +++ b/indra/llmessage/llregionpresenceverifier.h diff --git a/indra/llmessage/llsdappservices.cpp b/indra/llmessage/llsdappservices.cpp index 8bab91b0c0..8bab91b0c0 100644..100755 --- a/indra/llmessage/llsdappservices.cpp +++ b/indra/llmessage/llsdappservices.cpp diff --git a/indra/llmessage/llsdappservices.h b/indra/llmessage/llsdappservices.h index e76e20cea9..e76e20cea9 100644..100755 --- a/indra/llmessage/llsdappservices.h +++ b/indra/llmessage/llsdappservices.h diff --git a/indra/llmessage/llsdhttpserver.cpp b/indra/llmessage/llsdhttpserver.cpp index 5c8fc7b2bb..5c8fc7b2bb 100644..100755 --- a/indra/llmessage/llsdhttpserver.cpp +++ b/indra/llmessage/llsdhttpserver.cpp diff --git a/indra/llmessage/llsdhttpserver.h b/indra/llmessage/llsdhttpserver.h index 39f9204604..39f9204604 100644..100755 --- a/indra/llmessage/llsdhttpserver.h +++ b/indra/llmessage/llsdhttpserver.h diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp index 1c93c12d99..1c93c12d99 100644..100755 --- a/indra/llmessage/llsdmessage.cpp +++ b/indra/llmessage/llsdmessage.cpp diff --git a/indra/llmessage/llsdmessage.h b/indra/llmessage/llsdmessage.h index 0d34847ff2..0d34847ff2 100644..100755 --- a/indra/llmessage/llsdmessage.h +++ b/indra/llmessage/llsdmessage.h diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 615221e0ad..615221e0ad 100644..100755 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp diff --git a/indra/llmessage/llsdmessagebuilder.h b/indra/llmessage/llsdmessagebuilder.h index 9c7c1bfde3..9c7c1bfde3 100644..100755 --- a/indra/llmessage/llsdmessagebuilder.h +++ b/indra/llmessage/llsdmessagebuilder.h diff --git a/indra/llmessage/llsdmessagereader.cpp b/indra/llmessage/llsdmessagereader.cpp index a6fccd2a56..a6fccd2a56 100644..100755 --- a/indra/llmessage/llsdmessagereader.cpp +++ b/indra/llmessage/llsdmessagereader.cpp diff --git a/indra/llmessage/llsdmessagereader.h b/indra/llmessage/llsdmessagereader.h index 3b3d7fbfbe..3b3d7fbfbe 100644..100755 --- a/indra/llmessage/llsdmessagereader.h +++ b/indra/llmessage/llsdmessagereader.h diff --git a/indra/llmessage/llsdrpcclient.cpp b/indra/llmessage/llsdrpcclient.cpp index 05b27f582c..05b27f582c 100644..100755 --- a/indra/llmessage/llsdrpcclient.cpp +++ b/indra/llmessage/llsdrpcclient.cpp diff --git a/indra/llmessage/llsdrpcclient.h b/indra/llmessage/llsdrpcclient.h index 0cecf4f688..0cecf4f688 100644..100755 --- a/indra/llmessage/llsdrpcclient.h +++ b/indra/llmessage/llsdrpcclient.h diff --git a/indra/llmessage/llsdrpcserver.cpp b/indra/llmessage/llsdrpcserver.cpp index 2c233c1c0d..2c233c1c0d 100644..100755 --- a/indra/llmessage/llsdrpcserver.cpp +++ b/indra/llmessage/llsdrpcserver.cpp diff --git a/indra/llmessage/llsdrpcserver.h b/indra/llmessage/llsdrpcserver.h index 9e56e4ea46..9e56e4ea46 100644..100755 --- a/indra/llmessage/llsdrpcserver.h +++ b/indra/llmessage/llsdrpcserver.h diff --git a/indra/llmessage/llservice.cpp b/indra/llmessage/llservice.cpp index dbec92c221..dbec92c221 100644..100755 --- a/indra/llmessage/llservice.cpp +++ b/indra/llmessage/llservice.cpp diff --git a/indra/llmessage/llservice.h b/indra/llmessage/llservice.h index 9c09aeb44c..9c09aeb44c 100644..100755 --- a/indra/llmessage/llservice.h +++ b/indra/llmessage/llservice.h diff --git a/indra/llmessage/llservicebuilder.cpp b/indra/llmessage/llservicebuilder.cpp index b9aef3d0ba..b9aef3d0ba 100644..100755 --- a/indra/llmessage/llservicebuilder.cpp +++ b/indra/llmessage/llservicebuilder.cpp diff --git a/indra/llmessage/llservicebuilder.h b/indra/llmessage/llservicebuilder.h index 968995edf2..968995edf2 100644..100755 --- a/indra/llmessage/llservicebuilder.h +++ b/indra/llmessage/llservicebuilder.h diff --git a/indra/llmessage/llstoredmessage.cpp b/indra/llmessage/llstoredmessage.cpp index 9f2f2bcda7..9f2f2bcda7 100644..100755 --- a/indra/llmessage/llstoredmessage.cpp +++ b/indra/llmessage/llstoredmessage.cpp diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h index 9c98e2c558..9c98e2c558 100644..100755 --- a/indra/llmessage/llstoredmessage.h +++ b/indra/llmessage/llstoredmessage.h diff --git a/indra/llmessage/lltaskname.h b/indra/llmessage/lltaskname.h index 5dbd9c6223..5dbd9c6223 100644..100755 --- a/indra/llmessage/lltaskname.h +++ b/indra/llmessage/lltaskname.h diff --git a/indra/llmessage/llteleportflags.h b/indra/llmessage/llteleportflags.h index b3fcad036e..b3fcad036e 100644..100755 --- a/indra/llmessage/llteleportflags.h +++ b/indra/llmessage/llteleportflags.h diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 9e8eb48460..9e8eb48460 100644..100755 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp diff --git a/indra/llmessage/lltemplatemessagebuilder.h b/indra/llmessage/lltemplatemessagebuilder.h index 4f614a4657..4f614a4657 100644..100755 --- a/indra/llmessage/lltemplatemessagebuilder.h +++ b/indra/llmessage/lltemplatemessagebuilder.h diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp index ee7a4e7e71..ee7a4e7e71 100644..100755 --- a/indra/llmessage/lltemplatemessagedispatcher.cpp +++ b/indra/llmessage/lltemplatemessagedispatcher.cpp diff --git a/indra/llmessage/lltemplatemessagedispatcher.h b/indra/llmessage/lltemplatemessagedispatcher.h index fe77f92074..fe77f92074 100644..100755 --- a/indra/llmessage/lltemplatemessagedispatcher.h +++ b/indra/llmessage/lltemplatemessagedispatcher.h diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp index ab91f74abe..ab91f74abe 100644..100755 --- a/indra/llmessage/lltemplatemessagereader.cpp +++ b/indra/llmessage/lltemplatemessagereader.cpp diff --git a/indra/llmessage/lltemplatemessagereader.h b/indra/llmessage/lltemplatemessagereader.h index fcf8f92fa6..fcf8f92fa6 100644..100755 --- a/indra/llmessage/lltemplatemessagereader.h +++ b/indra/llmessage/lltemplatemessagereader.h diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index 64ebd51fec..64ebd51fec 100644..100755 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp diff --git a/indra/llmessage/llthrottle.h b/indra/llmessage/llthrottle.h index ed0aeb4602..ed0aeb4602 100644..100755 --- a/indra/llmessage/llthrottle.h +++ b/indra/llmessage/llthrottle.h diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index 034680caf8..034680caf8 100644..100755 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp diff --git a/indra/llmessage/lltransfermanager.h b/indra/llmessage/lltransfermanager.h index 252e05d1d1..252e05d1d1 100644..100755 --- a/indra/llmessage/lltransfermanager.h +++ b/indra/llmessage/lltransfermanager.h diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 8537773a3f..8537773a3f 100644..100755 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp diff --git a/indra/llmessage/lltransfersourceasset.h b/indra/llmessage/lltransfersourceasset.h index 3abda83cf8..3abda83cf8 100644..100755 --- a/indra/llmessage/lltransfersourceasset.h +++ b/indra/llmessage/lltransfersourceasset.h diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 43c9448fba..43c9448fba 100644..100755 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp diff --git a/indra/llmessage/lltransfersourcefile.h b/indra/llmessage/lltransfersourcefile.h index 985042417e..985042417e 100644..100755 --- a/indra/llmessage/lltransfersourcefile.h +++ b/indra/llmessage/lltransfersourcefile.h diff --git a/indra/llmessage/lltransfertargetfile.cpp b/indra/llmessage/lltransfertargetfile.cpp index 560fc8b6e4..560fc8b6e4 100644..100755 --- a/indra/llmessage/lltransfertargetfile.cpp +++ b/indra/llmessage/lltransfertargetfile.cpp diff --git a/indra/llmessage/lltransfertargetfile.h b/indra/llmessage/lltransfertargetfile.h index 6d03ff2d2e..6d03ff2d2e 100644..100755 --- a/indra/llmessage/lltransfertargetfile.h +++ b/indra/llmessage/lltransfertargetfile.h diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index c78d9288b6..c78d9288b6 100644..100755 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp diff --git a/indra/llmessage/lltransfertargetvfile.h b/indra/llmessage/lltransfertargetvfile.h index 23a65e4bb2..23a65e4bb2 100644..100755 --- a/indra/llmessage/lltransfertargetvfile.h +++ b/indra/llmessage/lltransfertargetvfile.h diff --git a/indra/llmessage/lltrustedmessageservice.cpp b/indra/llmessage/lltrustedmessageservice.cpp index fea7fc72c4..fea7fc72c4 100644..100755 --- a/indra/llmessage/lltrustedmessageservice.cpp +++ b/indra/llmessage/lltrustedmessageservice.cpp diff --git a/indra/llmessage/lltrustedmessageservice.h b/indra/llmessage/lltrustedmessageservice.h index 688937ac2c..688937ac2c 100644..100755 --- a/indra/llmessage/lltrustedmessageservice.h +++ b/indra/llmessage/lltrustedmessageservice.h diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 1264659b62..7281ac35af 100644..100755 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -175,6 +175,10 @@ LLURLRequest::~LLURLRequest() void LLURLRequest::setURL(const std::string& url) { mDetail->mURL = url; + if (url.empty()) + { + llwarns << "empty URL specified" << llendl; + } } std::string LLURLRequest::getURL() const diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h index 44d358d906..44d358d906 100644..100755 --- a/indra/llmessage/llurlrequest.h +++ b/indra/llmessage/llurlrequest.h diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index a4a68d0c81..a4a68d0c81 100644..100755 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 7db5f0b27f..7db5f0b27f 100644..100755 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h diff --git a/indra/llmessage/llvehicleparams.h b/indra/llmessage/llvehicleparams.h index f34df7744e..f34df7744e 100644..100755 --- a/indra/llmessage/llvehicleparams.h +++ b/indra/llmessage/llvehicleparams.h diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index f8c55d52ad..f8c55d52ad 100644..100755 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index f9348eb11f..f9348eb11f 100644..100755 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index 9e02af2c3e..9e02af2c3e 100644..100755 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp diff --git a/indra/llmessage/llxfer_file.h b/indra/llmessage/llxfer_file.h index a37dda6732..a37dda6732 100644..100755 --- a/indra/llmessage/llxfer_file.h +++ b/indra/llmessage/llxfer_file.h diff --git a/indra/llmessage/llxfer_mem.cpp b/indra/llmessage/llxfer_mem.cpp index 4c7e83c33d..4c7e83c33d 100644..100755 --- a/indra/llmessage/llxfer_mem.cpp +++ b/indra/llmessage/llxfer_mem.cpp diff --git a/indra/llmessage/llxfer_mem.h b/indra/llmessage/llxfer_mem.h index b5adf837df..b5adf837df 100644..100755 --- a/indra/llmessage/llxfer_mem.h +++ b/indra/llmessage/llxfer_mem.h diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index 751a69518c..751a69518c 100644..100755 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h index 048bf49dcc..048bf49dcc 100644..100755 --- a/indra/llmessage/llxfer_vfile.h +++ b/indra/llmessage/llxfer_vfile.h diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 00b9d81611..00b9d81611 100644..100755 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index b84bccb5b7..b84bccb5b7 100644..100755 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h diff --git a/indra/llmessage/llxorcipher.cpp b/indra/llmessage/llxorcipher.cpp index 9053e1b2f1..9053e1b2f1 100644..100755 --- a/indra/llmessage/llxorcipher.cpp +++ b/indra/llmessage/llxorcipher.cpp diff --git a/indra/llmessage/llxorcipher.h b/indra/llmessage/llxorcipher.h index c5b0700f0d..c5b0700f0d 100644..100755 --- a/indra/llmessage/llxorcipher.h +++ b/indra/llmessage/llxorcipher.h diff --git a/indra/llmessage/machine.cpp b/indra/llmessage/machine.cpp index 8d2f512037..8d2f512037 100644..100755 --- a/indra/llmessage/machine.cpp +++ b/indra/llmessage/machine.cpp diff --git a/indra/llmessage/machine.h b/indra/llmessage/machine.h index 07aadd47d2..07aadd47d2 100644..100755 --- a/indra/llmessage/machine.h +++ b/indra/llmessage/machine.h diff --git a/indra/llmessage/mean_collision_data.h b/indra/llmessage/mean_collision_data.h index 29de091603..29de091603 100644..100755 --- a/indra/llmessage/mean_collision_data.h +++ b/indra/llmessage/mean_collision_data.h diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index ae95087377..ae95087377 100644..100755 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index e94e2282a0..e94e2282a0 100644..100755 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index d7658862da..39cfb6019e 100644..100755 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -279,6 +279,8 @@ char const* const _PREHASH_GrabOffset = LLMessageStringTable::getInstance()->get char const* const _PREHASH_SimPort = LLMessageStringTable::getInstance()->getString("SimPort"); char const* const _PREHASH_PricePerMeter = LLMessageStringTable::getInstance()->getString("PricePerMeter"); char const* const _PREHASH_RegionFlags = LLMessageStringTable::getInstance()->getString("RegionFlags"); +char const* const _PREHASH_RegionFlagsExtended = LLMessageStringTable::getInstance()->getString("RegionFlagsExtended"); +char const* const _PREHASH_RegionProtocols = LLMessageStringTable::getInstance()->getString("RegionProtocols"); char const* const _PREHASH_VoteResult = LLMessageStringTable::getInstance()->getString("VoteResult"); char const* const _PREHASH_ParcelDirFeeEstimate = LLMessageStringTable::getInstance()->getString("ParcelDirFeeEstimate"); char const* const _PREHASH_ModifyBlock = LLMessageStringTable::getInstance()->getString("ModifyBlock"); @@ -305,6 +307,8 @@ char const* const _PREHASH_ViewerStartAuction = LLMessageStringTable::getInstanc char const* const _PREHASH_StartAuction = LLMessageStringTable::getInstance()->getString("StartAuction"); char const* const _PREHASH_DuplicateFlags = LLMessageStringTable::getInstance()->getString("DuplicateFlags"); char const* const _PREHASH_RegionInfo2 = LLMessageStringTable::getInstance()->getString("RegionInfo2"); +char const* const _PREHASH_RegionInfo3 = LLMessageStringTable::getInstance()->getString("RegionInfo3"); +char const* const _PREHASH_RegionInfo4 = LLMessageStringTable::getInstance()->getString("RegionInfo4"); char const* const _PREHASH_TextColor = LLMessageStringTable::getInstance()->getString("TextColor"); char const* const _PREHASH_SlaveID = LLMessageStringTable::getInstance()->getString("SlaveID"); char const* const _PREHASH_Charter = LLMessageStringTable::getInstance()->getString("Charter"); @@ -1376,3 +1380,6 @@ char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->get char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs"); char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds"); char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds"); +char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData"); +char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion"); +char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index da2b613f53..573e10dc0b 100644..100755 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -279,6 +279,8 @@ extern char const* const _PREHASH_GrabOffset; extern char const* const _PREHASH_SimPort; extern char const* const _PREHASH_PricePerMeter; extern char const* const _PREHASH_RegionFlags; +extern char const* const _PREHASH_RegionFlagsExtended; +extern char const* const _PREHASH_RegionProtocols; extern char const* const _PREHASH_VoteResult; extern char const* const _PREHASH_ParcelDirFeeEstimate; extern char const* const _PREHASH_ModifyBlock; @@ -305,6 +307,8 @@ extern char const* const _PREHASH_ViewerStartAuction; extern char const* const _PREHASH_StartAuction; extern char const* const _PREHASH_DuplicateFlags; extern char const* const _PREHASH_RegionInfo2; +extern char const* const _PREHASH_RegionInfo3; +extern char const* const _PREHASH_RegionInfo4; extern char const* const _PREHASH_TextColor; extern char const* const _PREHASH_SlaveID; extern char const* const _PREHASH_Charter; @@ -1376,4 +1380,7 @@ extern char const* const _PREHASH_ProductSKU; extern char const* const _PREHASH_SeeAVs; extern char const* const _PREHASH_AnyAVSounds; extern char const* const _PREHASH_GroupAVSounds; +extern char const* const _PREHASH_AppearanceData; +extern char const* const _PREHASH_AppearanceVersion; +extern char const* const _PREHASH_CofVersion; #endif diff --git a/indra/llmessage/message_string_table.cpp b/indra/llmessage/message_string_table.cpp index dd063fcb83..dd063fcb83 100644..100755 --- a/indra/llmessage/message_string_table.cpp +++ b/indra/llmessage/message_string_table.cpp diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 1c9508214c..1c9508214c 100644..100755 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index 0f2437479d..0f2437479d 100644..100755 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index ad21614258..ad21614258 100644..100755 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp diff --git a/indra/llmessage/partsyspacket.h b/indra/llmessage/partsyspacket.h index d9abecea3f..d9abecea3f 100644..100755 --- a/indra/llmessage/partsyspacket.h +++ b/indra/llmessage/partsyspacket.h diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp index e5d7f19448..e5d7f19448 100644..100755 --- a/indra/llmessage/patch_code.cpp +++ b/indra/llmessage/patch_code.cpp diff --git a/indra/llmessage/patch_code.h b/indra/llmessage/patch_code.h index 4c87c9808a..4c87c9808a 100644..100755 --- a/indra/llmessage/patch_code.h +++ b/indra/llmessage/patch_code.h diff --git a/indra/llmessage/patch_dct.cpp b/indra/llmessage/patch_dct.cpp index b5518b61ea..b5518b61ea 100644..100755 --- a/indra/llmessage/patch_dct.cpp +++ b/indra/llmessage/patch_dct.cpp diff --git a/indra/llmessage/patch_dct.h b/indra/llmessage/patch_dct.h index 101231ec84..101231ec84 100644..100755 --- a/indra/llmessage/patch_dct.h +++ b/indra/llmessage/patch_dct.h diff --git a/indra/llmessage/patch_idct.cpp b/indra/llmessage/patch_idct.cpp index 9ce35df284..9ce35df284 100644..100755 --- a/indra/llmessage/patch_idct.cpp +++ b/indra/llmessage/patch_idct.cpp diff --git a/indra/llmessage/sound_ids.cpp b/indra/llmessage/sound_ids.cpp index 2b8a0807c6..2b8a0807c6 100644..100755 --- a/indra/llmessage/sound_ids.cpp +++ b/indra/llmessage/sound_ids.cpp diff --git a/indra/llmessage/sound_ids.h b/indra/llmessage/sound_ids.h index 6a2e343ad3..6a2e343ad3 100644..100755 --- a/indra/llmessage/sound_ids.h +++ b/indra/llmessage/sound_ids.h diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h index 0d149b5258..0d149b5258 100644..100755 --- a/indra/llmessage/tests/commtest.h +++ b/indra/llmessage/tests/commtest.h diff --git a/indra/llmessage/tests/llareslistener_test.cpp b/indra/llmessage/tests/llareslistener_test.cpp index 60c91e12cf..60c91e12cf 100644..100755 --- a/indra/llmessage/tests/llareslistener_test.cpp +++ b/indra/llmessage/tests/llareslistener_test.cpp diff --git a/indra/llmessage/tests/llavatarnamecache_test.cpp b/indra/llmessage/tests/llavatarnamecache_test.cpp index ec6b65d483..ec6b65d483 100644..100755 --- a/indra/llmessage/tests/llavatarnamecache_test.cpp +++ b/indra/llmessage/tests/llavatarnamecache_test.cpp diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp index 9b298d0c04..9b298d0c04 100644..100755 --- a/indra/llmessage/tests/llcurl_stub.cpp +++ b/indra/llmessage/tests/llcurl_stub.cpp diff --git a/indra/llmessage/tests/llhost_test.cpp b/indra/llmessage/tests/llhost_test.cpp index eadf83c428..eadf83c428 100644..100755 --- a/indra/llmessage/tests/llhost_test.cpp +++ b/indra/llmessage/tests/llhost_test.cpp diff --git a/indra/llmessage/tests/llhttpclient_test.cpp b/indra/llmessage/tests/llhttpclient_test.cpp index 7c3def6024..87cbafa404 100644..100755 --- a/indra/llmessage/tests/llhttpclient_test.cpp +++ b/indra/llmessage/tests/llhttpclient_test.cpp @@ -47,37 +47,6 @@ namespace tut { - LLSD storage; - - class LLSDStorageNode : public LLHTTPNode - { - public: - LLSD simpleGet() const { return storage; } - LLSD simplePut(const LLSD& value) const { storage = value; return LLSD(); } - }; - - class ErrorNode : public LLHTTPNode - { - public: - void get(ResponsePtr r, const LLSD& context) const - { r->status(599, "Intentional error"); } - void post(ResponsePtr r, const LLSD& context, const LLSD& input) const - { r->status(input["status"], input["reason"]); } - }; - - class TimeOutNode : public LLHTTPNode - { - public: - void get(ResponsePtr r, const LLSD& context) const - { - /* do nothing, the request will eventually time out */ - } - }; - - LLHTTPRegistration<LLSDStorageNode> gStorageNode("/test/storage"); - LLHTTPRegistration<ErrorNode> gErrorNode("/test/error"); - LLHTTPRegistration<TimeOutNode> gTimeOutNode("/test/timeout"); - struct HTTPClientTestData { public: @@ -91,7 +60,6 @@ namespace tut ensure("Set environment variable PORT to local test server port", PORT); apr_pool_create(&mPool, NULL); LLCurl::initClass(false); - mServerPump = new LLPumpIO(mPool); mClientPump = new LLPumpIO(mPool); LLHTTPClient::setPump(*mClientPump); @@ -99,20 +67,11 @@ namespace tut ~HTTPClientTestData() { - delete mServerPump; delete mClientPump; LLProxy::cleanupClass(); apr_pool_destroy(mPool); } - void setupTheServer() - { - LLHTTPNode& root = LLIOHTTPServer::create(mPool, *mServerPump, 8888); - - LLHTTPStandardServices::useServices(); - LLHTTPRegistrar::buildAllServices(root); - } - void runThePump(float timeout = 100.0f) { LLTimer timer; @@ -120,11 +79,7 @@ namespace tut while(!mSawCompleted && !mSawCompletedHeader && !timer.hasExpired()) { - if (mServerPump) - { - mServerPump->pump(); - mServerPump->callback(); - } + LLFrameTimer::updateFrameTime(); if (mClientPump) { mClientPump->pump(); @@ -133,18 +88,11 @@ namespace tut } } - void killServer() - { - delete mServerPump; - mServerPump = NULL; - } - const char* const PORT; const std::string local_server; private: apr_pool_t* mPool; - LLPumpIO* mServerPump; LLPumpIO* mClientPump; protected: @@ -288,14 +236,12 @@ namespace tut sd["list"][1]["three"] = 3; sd["list"][1]["four"] = 4; - setupTheServer(); - - LLHTTPClient::post("http://localhost:8888/web/echo", sd, newResult()); + LLHTTPClient::post(local_server + "web/echo", sd, newResult()); runThePump(); ensureStatusOK(); ensure_equals("echoed result matches", getResult(), sd); } - + template<> template<> void HTTPClientTestObject::test<4>() { @@ -303,12 +249,11 @@ namespace tut sd["message"] = "This is my test message."; - setupTheServer(); - LLHTTPClient::put("http://localhost:8888/test/storage", sd, newResult()); + LLHTTPClient::put(local_server + "test/storage", sd, newResult()); runThePump(); ensureStatusOK(); - LLHTTPClient::get("http://localhost:8888/test/storage", newResult()); + LLHTTPClient::get(local_server + "test/storage", newResult()); runThePump(); ensureStatusOK(); ensure_equals("echoed result matches", getResult(), sd); @@ -322,9 +267,7 @@ namespace tut sd["status"] = 543; sd["reason"] = "error for testing"; - setupTheServer(); - - LLHTTPClient::post("http://localhost:8888/test/error", sd, newResult()); + LLHTTPClient::post(local_server + "test/error", sd, newResult()); runThePump(); ensureStatusError(); ensure_contains("reason", mReason, sd["reason"]); @@ -333,23 +276,16 @@ namespace tut template<> template<> void HTTPClientTestObject::test<6>() { - setupTheServer(); - - LLHTTPClient::get("http://localhost:8888/test/timeout", newResult()); - runThePump(1.0f); - killServer(); - runThePump(); + const F32 timeout = 1.0f; + LLHTTPClient::get(local_server + "test/timeout", newResult(), LLSD(), timeout); + runThePump(timeout * 5.0f); ensureStatusError(); - ensure_equals("reason", mReason, "STATUS_ERROR"); + ensure_equals("reason", mReason, "STATUS_EXPIRED"); } template<> template<> void HTTPClientTestObject::test<7>() { - // Can not use the little mini server. The blocking request - // won't ever let it run. Instead get from a known LLSD - // source and compare results with the non-blocking get which - // is tested against the mini server earlier. LLHTTPClient::get(local_server, newResult()); runThePump(); ensureStatusOK(); diff --git a/indra/llmessage/tests/llhttpclientadapter_test.cpp b/indra/llmessage/tests/llhttpclientadapter_test.cpp index 13ce0a0edd..13ce0a0edd 100644..100755 --- a/indra/llmessage/tests/llhttpclientadapter_test.cpp +++ b/indra/llmessage/tests/llhttpclientadapter_test.cpp diff --git a/indra/llmessage/tests/llmime_test.cpp b/indra/llmessage/tests/llmime_test.cpp index aed5c4589c..aed5c4589c 100644..100755 --- a/indra/llmessage/tests/llmime_test.cpp +++ b/indra/llmessage/tests/llmime_test.cpp diff --git a/indra/llmessage/tests/llmockhttpclient.h b/indra/llmessage/tests/llmockhttpclient.h index af26bf8803..af26bf8803 100644..100755 --- a/indra/llmessage/tests/llmockhttpclient.h +++ b/indra/llmessage/tests/llmockhttpclient.h diff --git a/indra/llmessage/tests/llnamevalue_test.cpp b/indra/llmessage/tests/llnamevalue_test.cpp index 8902fdd2e8..8902fdd2e8 100644..100755 --- a/indra/llmessage/tests/llnamevalue_test.cpp +++ b/indra/llmessage/tests/llnamevalue_test.cpp diff --git a/indra/llmessage/tests/llpartdata_test.cpp b/indra/llmessage/tests/llpartdata_test.cpp index 9123bd06c7..9123bd06c7 100644..100755 --- a/indra/llmessage/tests/llpartdata_test.cpp +++ b/indra/llmessage/tests/llpartdata_test.cpp diff --git a/indra/llmessage/tests/llregionpresenceverifier_test.cpp b/indra/llmessage/tests/llregionpresenceverifier_test.cpp index 5b89f2a8c6..5b89f2a8c6 100644..100755 --- a/indra/llmessage/tests/llregionpresenceverifier_test.cpp +++ b/indra/llmessage/tests/llregionpresenceverifier_test.cpp diff --git a/indra/llmessage/tests/llsdmessage_test.cpp b/indra/llmessage/tests/llsdmessage_test.cpp index 44b024a83f..44b024a83f 100644..100755 --- a/indra/llmessage/tests/llsdmessage_test.cpp +++ b/indra/llmessage/tests/llsdmessage_test.cpp diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index 3b04530c1a..3b04530c1a 100644..100755 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp diff --git a/indra/llmessage/tests/lltesthttpclientadapter.cpp b/indra/llmessage/tests/lltesthttpclientadapter.cpp index 4539e4a540..4539e4a540 100644..100755 --- a/indra/llmessage/tests/lltesthttpclientadapter.cpp +++ b/indra/llmessage/tests/lltesthttpclientadapter.cpp diff --git a/indra/llmessage/tests/lltesthttpclientadapter.h b/indra/llmessage/tests/lltesthttpclientadapter.h index c29cbb3a2a..c29cbb3a2a 100644..100755 --- a/indra/llmessage/tests/lltesthttpclientadapter.h +++ b/indra/llmessage/tests/lltesthttpclientadapter.h diff --git a/indra/llmessage/tests/lltestmessagesender.cpp b/indra/llmessage/tests/lltestmessagesender.cpp index ee40e0249e..ee40e0249e 100644..100755 --- a/indra/llmessage/tests/lltestmessagesender.cpp +++ b/indra/llmessage/tests/lltestmessagesender.cpp diff --git a/indra/llmessage/tests/lltestmessagesender.h b/indra/llmessage/tests/lltestmessagesender.h index bb89289585..bb89289585 100644..100755 --- a/indra/llmessage/tests/lltestmessagesender.h +++ b/indra/llmessage/tests/lltestmessagesender.h diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp index b287a29841..b287a29841 100644..100755 --- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp +++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index a8c1adf9b4..a8c1adf9b4 100644..100755 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp diff --git a/indra/llmessage/tests/networkio.h b/indra/llmessage/tests/networkio.h index 2aff90ca1e..2aff90ca1e 100644..100755 --- a/indra/llmessage/tests/networkio.h +++ b/indra/llmessage/tests/networkio.h diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index fe4f3a8c01..e45249b1cb 100644..100755 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -39,6 +39,9 @@ sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) from indra.util.fastest_elementtree import parse as xml_parse from indra.base import llsd from testrunner import freeport, run, debug, VERBOSE +import time + +_storage=None class TestHTTPRequestHandler(BaseHTTPRequestHandler): """This subclass of BaseHTTPRequestHandler is to receive and echo @@ -90,21 +93,14 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): # Read the provided POST data. self.answer(self.read_xml()) + def do_PUT(self): + # Read the provided PUT data. + self.answer(self.read_xml()) + def answer(self, data, withdata=True): + global _storage debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path) - if "fail" not in self.path: - data = data.copy() # we're going to modify - # Ensure there's a "reply" key in data, even if there wasn't before - data["reply"] = data.get("reply", llsd.LLSD("success")) - response = llsd.format_xml(data) - debug("success: %s", response) - self.send_response(200) - self.send_header("Content-type", "application/llsd+xml") - self.send_header("Content-Length", str(len(response))) - self.end_headers() - if withdata: - self.wfile.write(response) - else: # fail requested + if "fail" in self.path or "test/error" in self.path: # fail requested status = data.get("status", 500) # self.responses maps an int status to a (short, long) pair of # strings. We want the longer string. That's why we pass a string @@ -117,6 +113,30 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): "without providing a reason" % status))[1]) debug("fail requested: %s: %r", status, reason) self.send_error(status, reason) + else: + if "web/echo" in self.path: + pass + elif "test/timeout" in self.path: + time.sleep(5.0) + return + elif "test/storage" in self.path: + if "GET" == self.command: + data = _storage + else: + _storage = data + data = "ok" + else: + data = data.copy() # we're going to modify + # Ensure there's a "reply" key in data, even if there wasn't before + data["reply"] = data.get("reply", llsd.LLSD("success")) + response = llsd.format_xml(data) + debug("success: %s", response) + self.send_response(200) + self.send_header("Content-type", "application/llsd+xml") + self.send_header("Content-Length", str(len(response))) + self.end_headers() + if withdata: + self.wfile.write(response) if not VERBOSE: # When VERBOSE is set, skip both these overrides because they exist to diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py index 5b9beb359b..5b9beb359b 100644..100755 --- a/indra/llmessage/tests/testrunner.py +++ b/indra/llmessage/tests/testrunner.py |