summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-08-31 13:47:47 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-08-31 13:47:47 -0700
commit30ff6cabd61f2f083df5df1e6e70cc94742af477 (patch)
tree631935f1cf59d19a91cdad65e9a75fe825afda7d /indra/llmessage
parentff11d74820c89822cd067b51727d9df1dc87d0d0 (diff)
parent3ac3a4b206c08ed06b889bdaa24074b6aa0e020a (diff)
Merge with trunk
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/CMakeLists.txt17
-rw-r--r--indra/llmessage/llares.h3
-rw-r--r--indra/llmessage/llassetstorage.cpp12
-rw-r--r--indra/llmessage/llassetstorage.h6
-rw-r--r--indra/llmessage/llcachename.cpp409
-rw-r--r--indra/llmessage/llcachename.h26
-rw-r--r--indra/llmessage/llcurl.cpp4
-rw-r--r--indra/llmessage/llcurl.h2
-rw-r--r--indra/llmessage/llhttpassetstorage.cpp2
-rw-r--r--indra/llmessage/llhttpassetstorage.h2
-rw-r--r--indra/llmessage/llhttpclientadapter.cpp7
-rw-r--r--indra/llmessage/llhttpclientadapter.h9
-rw-r--r--indra/llmessage/llhttpclientinterface.h7
-rw-r--r--indra/llmessage/llhttpnode.cpp18
-rw-r--r--indra/llmessage/llhttpnode.h14
-rw-r--r--indra/llmessage/llhttpnodeadapter.h15
-rw-r--r--indra/llmessage/llinstantmessage.cpp2
-rw-r--r--indra/llmessage/llinstantmessage.h3
-rw-r--r--indra/llmessage/lliohttpserver.cpp1
-rw-r--r--indra/llmessage/llmessagesenderinterface.h7
-rw-r--r--indra/llmessage/llpumpio.cpp4
-rw-r--r--indra/llmessage/llregionpresenceverifier.cpp25
-rw-r--r--indra/llmessage/llregionpresenceverifier.h26
-rw-r--r--indra/llmessage/llsdappservices.cpp4
-rw-r--r--indra/llmessage/llsdhttpserver.cpp4
-rw-r--r--indra/llmessage/llsdmessage.cpp4
-rw-r--r--indra/llmessage/llsdmessage.h2
-rw-r--r--indra/llmessage/llstoredmessage.cpp2
-rw-r--r--indra/llmessage/llstoredmessage.h2
-rw-r--r--indra/llmessage/lltemplatemessagedispatcher.cpp17
-rw-r--r--indra/llmessage/lltemplatemessagedispatcher.h17
-rw-r--r--indra/llmessage/lltemplatemessagereader.cpp4
-rw-r--r--indra/llmessage/lltrustedmessageservice.cpp17
-rw-r--r--indra/llmessage/lltrustedmessageservice.h17
-rw-r--r--indra/llmessage/message.cpp3
-rw-r--r--indra/llmessage/message.h2
-rw-r--r--indra/llmessage/message_prehash.cpp2
-rw-r--r--indra/llmessage/tests/commtest.h23
-rw-r--r--indra/llmessage/tests/llcurl_stub.cpp14
-rw-r--r--indra/llmessage/tests/llhttpclientadapter_test.cpp7
-rw-r--r--indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp17
-rw-r--r--indra/llmessage/tests/lltesthttpclientadapter.cpp2
-rw-r--r--indra/llmessage/tests/lltesthttpclientadapter.h2
-rw-r--r--indra/llmessage/tests/lltestmessagesender.cpp2
-rw-r--r--indra/llmessage/tests/lltestmessagesender.h2
-rw-r--r--indra/llmessage/tests/lltrustedmessageservice_test.cpp17
-rw-r--r--indra/llmessage/tests/networkio.h23
47 files changed, 433 insertions, 394 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index 81e518cf6e..4eb4a72ae7 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -223,6 +223,23 @@ IF (NOT LINUX AND VIEWER)
lltemplatemessagedispatcher.cpp
llregionpresenceverifier.cpp
)
+# set(TEST_DEBUG on)
+ set(test_libs
+ ${LLMESSAGE_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLCOMMON_LIBRARIES}
+ )
+
+ LL_ADD_INTEGRATION_TEST(
+ llsdmessage
+ "llsdmessage.cpp"
+ "${test_libs}"
+ ${PYTHON_EXECUTABLE}
+ "${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llsdmessage_peer.py"
+ )
+
LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
# Commented out - see rationale at bottom of newview's build file + poppy 2009-06-05
diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h
index 96d7f6dd31..c709a08499 100644
--- a/indra/llmessage/llares.h
+++ b/indra/llmessage/llares.h
@@ -45,7 +45,8 @@
# include <ares/ares.h>
#endif
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
#include "lluri.h"
class LLQueryResponder;
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 2966b602d7..b3087bcc3f 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -1025,12 +1025,12 @@ LLSD LLAssetStorage::getPendingDetails(LLAssetStorage::ERequestType rt,
{
const request_list_t* requests = getRequestList(rt);
LLSD sd;
- sd["requests"] = getPendingDetails(requests, asset_type, detail_prefix);
+ sd["requests"] = getPendingDetailsImpl(requests, asset_type, detail_prefix);
return sd;
}
// virtual
-LLSD LLAssetStorage::getPendingDetails(const LLAssetStorage::request_list_t* requests,
+LLSD LLAssetStorage::getPendingDetailsImpl(const LLAssetStorage::request_list_t* requests,
LLAssetType::EType asset_type,
const std::string& detail_prefix) const
{
@@ -1113,11 +1113,11 @@ LLSD LLAssetStorage::getPendingRequest(LLAssetStorage::ERequestType rt,
const LLUUID& asset_id) const
{
const request_list_t* requests = getRequestList(rt);
- return getPendingRequest(requests, asset_type, asset_id);
+ return getPendingRequestImpl(requests, asset_type, asset_id);
}
// virtual
-LLSD LLAssetStorage::getPendingRequest(const LLAssetStorage::request_list_t* requests,
+LLSD LLAssetStorage::getPendingRequestImpl(const LLAssetStorage::request_list_t* requests,
LLAssetType::EType asset_type,
const LLUUID& asset_id) const
{
@@ -1136,7 +1136,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
const LLUUID& asset_id)
{
request_list_t* requests = getRequestList(rt);
- if (deletePendingRequest(requests, asset_type, asset_id))
+ if (deletePendingRequestImpl(requests, asset_type, asset_id))
{
llinfos << "Asset " << getRequestName(rt) << " request for "
<< asset_id << "." << LLAssetType::lookup(asset_type)
@@ -1147,7 +1147,7 @@ bool LLAssetStorage::deletePendingRequest(LLAssetStorage::ERequestType rt,
}
// virtual
-bool LLAssetStorage::deletePendingRequest(LLAssetStorage::request_list_t* requests,
+bool LLAssetStorage::deletePendingRequestImpl(LLAssetStorage::request_list_t* requests,
LLAssetType::EType asset_type,
const LLUUID& asset_id)
{
diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h
index f01ee6a8e8..56adbd5ccf 100644
--- a/indra/llmessage/llassetstorage.h
+++ b/indra/llmessage/llassetstorage.h
@@ -306,15 +306,15 @@ public:
void markAssetToxic( const LLUUID& uuid );
protected:
- virtual LLSD getPendingDetails(const request_list_t* requests,
+ virtual LLSD getPendingDetailsImpl(const request_list_t* requests,
LLAssetType::EType asset_type,
const std::string& detail_prefix) const;
- virtual LLSD getPendingRequest(const request_list_t* requests,
+ virtual LLSD getPendingRequestImpl(const request_list_t* requests,
LLAssetType::EType asset_type,
const LLUUID& asset_id) const;
- virtual bool deletePendingRequest(request_list_t* requests,
+ virtual bool deletePendingRequestImpl(request_list_t* requests,
LLAssetType::EType asset_type,
const LLUUID& asset_id);
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 82186fc503..a4304596de 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -42,11 +42,7 @@
#include "llsdserialize.h"
#include "lluuid.h"
#include "message.h"
-
-// Constants
-static const std::string CN_WAITING("(Loading...)"); // *TODO: translate
-static const std::string CN_NOBODY("(nobody)"); // *TODO: translate
-static const std::string CN_NONE("(none)"); // *TODO: translate
+#include "llmemtype.h"
// llsd serialization constants
static const std::string AGENTS("agents");
@@ -65,6 +61,7 @@ const S32 CN_FILE_VERSION = 2;
// Globals
LLCacheName* gCacheName = NULL;
+std::map<std::string, std::string> LLCacheName::sCacheName;
/// ---------------------------------------------------------------------------
/// class LLCacheNameEntry
@@ -76,13 +73,11 @@ public:
LLCacheNameEntry();
public:
- bool isUnknown() { return (mFirstName.empty()
- || mFirstName == std::string("(???)")); };
-
- bool mIsGroup; // true if this is a group ID/name
- U32 mCreateTime; // unix time_t
- std::string mFirstName; // Doubles as the group name
- std::string mLastName; // Will be "" for groups
+ bool mIsGroup;
+ U32 mCreateTime; // unix time_t
+ std::string mFirstName;
+ std::string mLastName;
+ std::string mGroupName;
};
LLCacheNameEntry::LLCacheNameEntry()
@@ -94,17 +89,19 @@ class PendingReply
{
public:
LLUUID mID;
- LLCacheNameCallback mCallback;
+ LLCacheNameSignal mSignal;
LLHost mHost;
- void* mData;
- PendingReply(const LLUUID& id, LLCacheNameCallback callback, void* data = NULL)
- : mID(id), mCallback(callback), mData(data)
- { }
-
+
PendingReply(const LLUUID& id, const LLHost& host)
- : mID(id), mCallback(0), mHost(host)
- { }
-
+ : mID(id), mHost(host)
+ {
+ }
+
+ boost::signals2::connection setCallback(const LLCacheNameCallback& cb)
+ {
+ return mSignal.connect(cb);
+ }
+
void done() { mID.setNull(); }
bool isDone() const { return mID.isNull() != FALSE; }
};
@@ -164,7 +161,7 @@ void ReplySender::send(const LLUUID& id,
mMsg->addUUIDFast(_PREHASH_ID, id);
if(mCurrIsGroup)
{
- mMsg->addStringFast(_PREHASH_GroupName, entry.mFirstName);
+ mMsg->addStringFast(_PREHASH_GroupName, entry.mGroupName);
}
else
{
@@ -189,10 +186,9 @@ void ReplySender::flush()
typedef std::set<LLUUID> AskQueue;
-typedef std::vector<PendingReply> ReplyQueue;
+typedef std::list<PendingReply*> ReplyQueue;
typedef std::map<LLUUID,U32> PendingQueue;
typedef std::map<LLUUID, LLCacheNameEntry*> Cache;
-typedef std::vector<LLCacheNameCallback> Observers;
class LLCacheName::Impl
{
@@ -213,18 +209,20 @@ public:
ReplyQueue mReplyQueue;
// requests awaiting replies from us
- Observers mObservers;
+ LLCacheNameSignal mSignal;
LLFrameTimer mProcessTimer;
Impl(LLMessageSystem* msg);
~Impl();
-
+
+ boost::signals2::connection addPending(const LLUUID& id, const LLCacheNameCallback& callback);
+ void addPending(const LLUUID& id, const LLHost& host);
+
void processPendingAsks();
void processPendingReplies();
void sendRequest(const char* msg_name, const AskQueue& queue);
bool isRequestPending(const LLUUID& id);
- void makeNameRequestForID(const LLUUID& id, bool isGroup, LLHost & fromHost);
// Message system callbacks.
void processUUIDRequest(LLMessageSystem* msg, bool isGroup);
@@ -234,8 +232,6 @@ public:
static void handleUUIDNameReply(LLMessageSystem* msg, void** userdata);
static void handleUUIDGroupNameRequest(LLMessageSystem* msg, void** userdata);
static void handleUUIDGroupNameReply(LLMessageSystem* msg, void** userdata);
-
- void notifyObservers(const LLUUID& id, const std::string& first, const std::string& last, BOOL group);
};
@@ -250,6 +246,9 @@ LLCacheName::LLCacheName(LLMessageSystem* msg)
LLCacheName::LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host)
: impl(* new Impl(msg))
{
+ sCacheName["waiting"] = "(Loading...)";
+ sCacheName["nobody"] = "(nobody)";
+ sCacheName["none"] = "(none)";
setUpstream(upstream_host);
}
@@ -275,52 +274,31 @@ LLCacheName::Impl::Impl(LLMessageSystem* msg)
LLCacheName::Impl::~Impl()
{
for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
+ for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
}
-
-void LLCacheName::setUpstream(const LLHost& upstream_host)
+boost::signals2::connection LLCacheName::Impl::addPending(const LLUUID& id, const LLCacheNameCallback& callback)
{
- impl.mUpstreamHost = upstream_host;
+ PendingReply* reply = new PendingReply(id, LLHost());
+ boost::signals2::connection res = reply->setCallback(callback);
+ mReplyQueue.push_back(reply);
+ return res;
}
-void LLCacheName::addObserver(LLCacheNameCallback callback)
+void LLCacheName::Impl::addPending(const LLUUID& id, const LLHost& host)
{
- impl.mObservers.push_back(callback);
+ PendingReply* reply = new PendingReply(id, host);
+ mReplyQueue.push_back(reply);
}
-void LLCacheName::removeObserver(LLCacheNameCallback callback)
+void LLCacheName::setUpstream(const LLHost& upstream_host)
{
- Observers::iterator it = impl.mObservers.begin();
- Observers::iterator end = impl.mObservers.end();
-
- for ( ; it != end; ++it)
- {
- const LLCacheNameCallback& cb = (*it);
- if (cb == callback)
- {
- impl.mObservers.erase(it);
- return;
- }
- }
+ impl.mUpstreamHost = upstream_host;
}
-void LLCacheName::cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data)
+boost::signals2::connection LLCacheName::addObserver(const LLCacheNameCallback& callback)
{
- ReplyQueue::iterator it = impl.mReplyQueue.begin();
- ReplyQueue::iterator end = impl.mReplyQueue.end();
-
- for(; it != end; ++it)
- {
- const PendingReply& reply = (*it);
-
- if ((callback == reply.mCallback)
- && (id == reply.mID)
- && (user_data == reply.mData) )
- {
- impl.mReplyQueue.erase(it);
- return;
- }
- }
+ return impl.mSignal.connect(callback);
}
void LLCacheName::importFile(LLFILE* fp)
@@ -392,7 +370,6 @@ void LLCacheName::importFile(LLFILE* fp)
entry->mCreateTime = create_time;
entry->mFirstName = firstname;
entry->mLastName = lastname;
- //llinfos << "Adding entry from file for " << entry->mFirstName << " " << entry->mLastName << ", id " << id << llendl;
impl.mCache[id] = entry;
count++;
@@ -429,7 +406,6 @@ bool LLCacheName::importFile(std::istream& istr)
entry->mCreateTime = ctime;
entry->mFirstName = agent[FIRST].asString();
entry->mLastName = agent[LAST].asString();
- //llinfos << "Adding name entry from XML file for " << entry->mFirstName << " " << entry->mLastName << ", id " << id << llendl;
impl.mCache[id] = entry;
++count;
@@ -450,9 +426,7 @@ bool LLCacheName::importFile(std::istream& istr)
LLCacheNameEntry* entry = new LLCacheNameEntry();
entry->mIsGroup = true;
entry->mCreateTime = ctime;
- entry->mFirstName = group[NAME].asString();
- entry->mLastName = "";
- //llinfos << "Adding group entry from XML file for " << entry->mFirstName << " " << entry->mLastName << ", id " << id << llendl;
+ entry->mGroupName = group[NAME].asString();
impl.mCache[id] = entry;
++count;
}
@@ -470,37 +444,37 @@ void LLCacheName::exportFile(std::ostream& ostr)
// Only write entries for which we have valid data.
LLCacheNameEntry* entry = iter->second;
if(!entry
- || entry->isUnknown())
- { // No entry, or user or group name is unknown
+ || (std::string::npos != entry->mFirstName.find('?'))
+ || (std::string::npos != entry->mGroupName.find('?')))
+ {
continue;
}
// store it
LLUUID id = iter->first;
std::string id_str = id.asString();
- if(entry->mIsGroup)
- { // Save group name and ID
- data[GROUPS][id_str][NAME] = entry->mFirstName;
- data[GROUPS][id_str][CTIME] = (S32)entry->mCreateTime;
- }
- else if(!entry->mLastName.empty())
- { // Save user names and ID
+ if(!entry->mFirstName.empty() && !entry->mLastName.empty())
+ {
data[AGENTS][id_str][FIRST] = entry->mFirstName;
data[AGENTS][id_str][LAST] = entry->mLastName;
data[AGENTS][id_str][CTIME] = (S32)entry->mCreateTime;
}
+ else if(entry->mIsGroup && !entry->mGroupName.empty())
+ {
+ data[GROUPS][id_str][NAME] = entry->mGroupName;
+ data[GROUPS][id_str][CTIME] = (S32)entry->mCreateTime;
+ }
}
LLSDSerialize::toPrettyXML(data, ostr);
}
-// DO NOT CALL THIS FOR GROUP NAMES
BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& last)
{
if(id.isNull())
{
- first = CN_NOBODY;
+ first = sCacheName["nobody"];
last.clear();
return FALSE;
}
@@ -514,15 +488,23 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
}
else
{
- first = CN_WAITING;
+ first = sCacheName["waiting"];
last.clear();
if (!impl.isRequestPending(id))
{
- //llinfos << "**** adding name req for " << id << llendl;
impl.mAskNameQueue.insert(id);
}
+ return FALSE;
}
- return FALSE;
+
+}
+// static
+void LLCacheName::LocalizeCacheName(std::string key, std::string value)
+{
+ if (key!="" && value!= "" )
+ sCacheName[key]=value;
+ else
+ llwarns<< " Error localizing cache key " << key << " To "<< value<<llendl;
}
BOOL LLCacheName::getFullName(const LLUUID& id, std::string& fullname)
@@ -537,12 +519,12 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
{
if(id.isNull())
{
- group = CN_NONE;
+ group = sCacheName["none"];
return FALSE;
}
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache,id);
- if (entry && entry->mFirstName.empty())
+ if (entry && entry->mGroupName.empty())
{
// COUNTER-HACK to combat James' HACK in exportFile()...
// this group name was loaded from a name cache that did not
@@ -553,12 +535,12 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
if (entry)
{
- group = entry->mFirstName;
+ group = entry->mGroupName;
return TRUE;
}
else
{
- group = CN_WAITING;
+ group = sCacheName["waiting"];
if (!impl.isRequestPending(id))
{
impl.mAskGroupQueue.insert(id);
@@ -566,22 +548,39 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
return FALSE;
}
}
-
-// TODO: Make the cache name callback take a SINGLE std::string,
-// not a separate first and last name.
-void LLCacheName::getNameFromUUID(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data)
+// This is a little bit kludgy. LLCacheNameCallback is a slot instead of a function pointer.
+// The reason it is a slot is so that the legacy get() function below can bind an old callback
+// and pass it as a slot. The reason it isn't a boost::function is so that trackable behavior
+// deson't get lost. As a result, we have to bind the slot to a signal to call it, even when
+// we call it immediately. -Steve
+// NOTE: Even though passing first and last name is a bit of extra overhead, it eliminates the
+// potential need for any parsing should any code need to handle first and last name independently.
+boost::signals2::connection LLCacheName::get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback)
{
+ boost::signals2::connection res;
+
if(id.isNull())
{
- callback(id, CN_NOBODY, "", is_group, user_data);
- return;
+ LLCacheNameSignal signal;
+ signal.connect(callback);
+ signal(id, sCacheName["nobody"], "", is_group);
+ return res;
}
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
if (entry)
{
- // id found in map therefore we can call the callback immediately. mLastName will be empty for groups
- callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data);
+ LLCacheNameSignal signal;
+ signal.connect(callback);
+ // id found in map therefore we can call the callback immediately.
+ if (entry->mIsGroup)
+ {
+ signal(id, entry->mGroupName, "", entry->mIsGroup);
+ }
+ else
+ {
+ signal(id, entry->mFirstName, entry->mLastName, entry->mIsGroup);
+ }
}
else
{
@@ -590,23 +589,26 @@ void LLCacheName::getNameFromUUID(const LLUUID& id, BOOL is_group, LLCacheNameCa
{
if (is_group)
{
- //llinfos << "Group queued for " << id << llendl;
impl.mAskGroupQueue.insert(id);
}
else
{
- //llinfos << "Name queued for " << id << llendl;
impl.mAskNameQueue.insert(id);
}
}
-
- // There may be multiple replies for the same ID request
- impl.mReplyQueue.push_back(PendingReply(id, callback, user_data));
+ res = impl.addPending(id, callback);
}
+ return res;
+}
+
+boost::signals2::connection LLCacheName::get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data)
+{
+ return get(id, is_group, boost::bind(callback, _1, _2, _3, _4, user_data));
}
void LLCacheName::processPending()
{
+ LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
const F32 SECS_BETWEEN_PROCESS = 0.1f;
if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS))
{
@@ -665,7 +667,7 @@ void LLCacheName::dump()
{
llinfos
<< iter->first << " = (group) "
- << entry->mFirstName
+ << entry->mGroupName
<< " @ " << entry->mCreateTime
<< llendl;
}
@@ -688,18 +690,19 @@ void LLCacheName::dumpStats()
<< " AskGroup=" << impl.mAskGroupQueue.size()
<< " Pending=" << impl.mPendingQueue.size()
<< " Reply=" << impl.mReplyQueue.size()
- << " Observers=" << impl.mObservers.size()
+// << " Observers=" << impl.mSignal.size()
<< llendl;
}
//static
std::string LLCacheName::getDefaultName()
{
- return CN_WAITING;
+ return sCacheName["waiting"];
}
void LLCacheName::Impl::processPendingAsks()
{
+ LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS);
sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue);
sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue);
mAskNameQueue.clear();
@@ -708,40 +711,50 @@ void LLCacheName::Impl::processPendingAsks()
void LLCacheName::Impl::processPendingReplies()
{
- ReplyQueue::iterator it = mReplyQueue.begin();
- ReplyQueue::iterator end = mReplyQueue.end();
-
+ LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES);
// First call all the callbacks, because they might send messages.
- for(; it != end; ++it)
+ for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
{
- LLCacheNameEntry* entry = get_ptr_in_map(mCache, it->mID);
+ PendingReply* reply = *it;
+ LLCacheNameEntry* entry = get_ptr_in_map(mCache, reply->mID);
if(!entry) continue;
- if (it->mCallback)
+ if (!entry->mIsGroup)
+ {
+ (reply->mSignal)(reply->mID, entry->mFirstName, entry->mLastName, FALSE);
+ }
+ else
{
- (it->mCallback)(it->mID, entry->mFirstName, entry->mLastName, entry->mIsGroup, it->mData);
+ (reply->mSignal)(reply->mID, entry->mGroupName, "", TRUE);
}
}
// Forward on all replies, if needed.
ReplySender sender(mMsg);
- for (it = mReplyQueue.begin(); it != end; ++it)
+ for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
{
- LLCacheNameEntry* entry = get_ptr_in_map(mCache, it->mID);
+ PendingReply* reply = *it;
+ LLCacheNameEntry* entry = get_ptr_in_map(mCache, reply->mID);
if(!entry) continue;
- if (it->mHost.isOk())
+ if (reply->mHost.isOk())
{
- sender.send(it->mID, *entry, it->mHost);
+ sender.send(reply->mID, *entry, reply->mHost);
}
- it->done();
+ reply->done();
+ }
+
+ for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); )
+ {
+ ReplyQueue::iterator curit = it++;
+ PendingReply* reply = *curit;
+ if (reply->isDone())
+ {
+ delete reply;
+ mReplyQueue.erase(curit);
+ }
}
-
- mReplyQueue.erase(
- remove_if(mReplyQueue.begin(), mReplyQueue.end(),
- std::mem_fun_ref(&PendingReply::isDone)),
- mReplyQueue.end());
}
@@ -762,12 +775,10 @@ void LLCacheName::Impl::sendRequest(
if(start_new_message)
{
start_new_message = false;
- //llinfos << "newMessageFast : " << msg_name << llendl;
mMsg->newMessageFast(msg_name);
}
mMsg->nextBlockFast(_PREHASH_UUIDNameBlock);
mMsg->addUUIDFast(_PREHASH_ID, (*it));
- //llinfos << " asking for ID: " << (*it) << llendl;
if(mMsg->isSendFullFast(_PREHASH_UUIDNameBlock))
{
@@ -781,18 +792,6 @@ void LLCacheName::Impl::sendRequest(
}
}
-void LLCacheName::Impl::notifyObservers(const LLUUID& id,
- const std::string& first, const std::string& last, BOOL is_group)
-{
- for (Observers::const_iterator i = mObservers.begin(),
- end = mObservers.end();
- i != end;
- ++i)
- {
- (**i)(id, first, last, is_group, NULL);
- }
-}
-
bool LLCacheName::Impl::isRequestPending(const LLUUID& id)
{
U32 now = (U32)time(NULL);
@@ -833,102 +832,38 @@ void LLCacheName::Impl::processUUIDRequest(LLMessageSystem* msg, bool isGroup)
{
if (isGroup != entry->mIsGroup)
{
- if (entry->isUnknown())
- {
- Cache::iterator doomediter = mCache.find(id);
- if (doomediter != mCache.end())
- { // Kill existing unknown entry
- llwarns << "LLCacheName - Asked for "
- << (isGroup ? "group" : "user") << " name, "
- << "but found unknown "
- << (entry->mIsGroup ? "group" : "user")
- << " entry for: " << id
- << ", deleting bad entry"
- << llendl;
-
- delete entry;
- entry = NULL;
- mCache.erase(doomediter);
-
- // Request it with (hopefully) the correct type
- makeNameRequestForID(id,isGroup,fromHost);
- }
- }
- else if (isGroup)
- {
- llwarns << "LLCacheName - Asked for group name, but found user: "
- << id
- << " named "
- << entry->mFirstName << " " << entry->mLastName
- << llendl;
- }
- else
- {
- llwarns << "LLCacheName - Asked for user name, but found group: "
- << id
- << " named "
- << entry->mFirstName
- << llendl;
- }
+ llwarns << "LLCacheName - Asked for "
+ << (isGroup ? "group" : "user") << " name, "
+ << "but found "
+ << (entry->mIsGroup ? "group" : "user")
+ << ": " << id << llendl;
}
else
{
// ...it's in the cache, so send it as the reply
sender.send(id, *entry, fromHost);
-
- /*
+ }
+ }
+ else
+ {
+ if (!isRequestPending(id))
+ {
if (isGroup)
{
- llinfos << "Group ID " << id
- << " name " << entry->mFirstName
- << " was already in cache" << llendl;
+ mAskGroupQueue.insert(id);
}
else
{
- llinfos << "Agent ID " << id
- << " name " << entry->mFirstName << " " << entry->mLastName
- << " was already in cache" << llendl;
+ mAskNameQueue.insert(id);
}
- */
}
- }
- else
- { /*
- if (isGroup)
- {
- llinfos << "Group ID " << id << " is not in cache" << llendl;
- }
- else
- {
- llinfos << "Agent ID " << id << " is not in cache" << llendl;
- }
- */
- makeNameRequestForID(id,isGroup,fromHost);
+
+ addPending(id, fromHost);
}
}
}
-void LLCacheName::Impl::makeNameRequestForID(const LLUUID& id, bool isGroup, LLHost & fromHost)
-{
- if (!isRequestPending(id))
- {
- if (isGroup)
- {
- //llinfos << "Adding group request for " << id << llendl;
- mAskGroupQueue.insert(id);
- }
- else
- {
- //llinfos << "Adding name request for " << id << llendl;
- mAskNameQueue.insert(id);
- }
- }
-
- // There may be multiple replys for the same ID request
- mReplyQueue.push_back(PendingReply(id, fromHost));
-}
-
void LLCacheName::Impl::processUUIDReply(LLMessageSystem* msg, bool isGroup)
{
@@ -938,53 +873,35 @@ void LLCacheName::Impl::processUUIDReply(LLMessageSystem* msg, bool isGroup)
LLUUID id;
msg->getUUIDFast(_PREHASH_UUIDNameBlock, _PREHASH_ID, id, i);
LLCacheNameEntry* entry = get_ptr_in_map(mCache, id);
- bool add_new_entry_to_cache = false;
if (!entry)
{
entry = new LLCacheNameEntry;
- add_new_entry_to_cache = true;
+ mCache[id] = entry;
}
- // Remove ID from pending queue
mPendingQueue.erase(id);
- std::string first_name;
- std::string last_name;
- if (isGroup)
- { // Group
- msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_GroupName, first_name, i);
- LLStringFn::replace_ascii_controlchars(first_name, LL_UNKNOWN_CHAR);
+ entry->mIsGroup = isGroup;
+ entry->mCreateTime = (U32)time(NULL);
+ if (!isGroup)
+ {
+ msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_FirstName, entry->mFirstName, i);
+ msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_LastName, entry->mLastName, i);
}
else
- { // User
- msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_FirstName, first_name, i);
- msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_LastName, last_name, i);
- }
-
- if (!add_new_entry_to_cache &&
- (entry->mFirstName != first_name ||
- entry->mLastName != last_name ||
- entry->mIsGroup != isGroup))
- { // Hmmm, we already had an different entry for this ID. Let's see what happened...
- llwarns << "Replacing existing entry in name cache for id " << id
- << " first name was " << entry->mFirstName << ", now " << first_name
- << " last name was " << entry->mLastName << ", now " << last_name
- << " group flag was " << (S32) entry->mIsGroup << ", now " << (S32) isGroup
- << llendl;
+ { // is group
+ msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_GroupName, entry->mGroupName, i);
+ LLStringFn::replace_ascii_controlchars(entry->mGroupName, LL_UNKNOWN_CHAR);
}
- entry->mFirstName = first_name;
- entry->mLastName = last_name;
- entry->mIsGroup = isGroup;
- entry->mCreateTime = (U32)time(NULL);
-
- if (add_new_entry_to_cache)
+ if (!isGroup)
{
- //llinfos << "Adding entry for " << entry->mFirstName << " " << entry->mLastName << ", id " << id << llendl;
- mCache[id] = entry;
+ mSignal(id, entry->mFirstName, entry->mLastName, FALSE);
+ }
+ else
+ {
+ mSignal(id, entry->mGroupName, "", TRUE);
}
-
- notifyObservers(id, entry->mFirstName, entry->mLastName, isGroup);
}
}
diff --git a/indra/llmessage/llcachename.h b/indra/llmessage/llcachename.h
index bfa116ad4a..c044b3d80d 100644
--- a/indra/llmessage/llcachename.h
+++ b/indra/llmessage/llcachename.h
@@ -33,12 +33,22 @@
#ifndef LL_LLCACHENAME_H
#define LL_LLCACHENAME_H
+#include <boost/bind.hpp>
+#include <boost/signals2.hpp>
+
class LLMessageSystem;
class LLHost;
class LLUUID;
-// agent_id/group_id, first_name, last_name, is_group, user_data
-typedef void (*LLCacheNameCallback)(const LLUUID&, const std::string&, const std::string&, BOOL, void*);
+
+typedef boost::signals2::signal<void (const LLUUID& id,
+ const std::string& first_name,
+ const std::string& last_name,
+ BOOL is_group)> LLCacheNameSignal;
+typedef LLCacheNameSignal::slot_type LLCacheNameCallback;
+
+// Old callback with user data for compatability
+typedef void (*old_callback_t)(const LLUUID&, const std::string&, const std::string&, BOOL, void*);
// Here's the theory:
// If you request a name that isn't in the cache, it returns "waiting"
@@ -59,10 +69,7 @@ public:
// for simulators, this is the data server
void setUpstream(const LLHost& upstream_host);
- void addObserver(LLCacheNameCallback callback);
- void removeObserver(LLCacheNameCallback callback);
-
- void cancelCallback(const LLUUID& id, LLCacheNameCallback callback, void* user_data = NULL);
+ boost::signals2::connection addObserver(const LLCacheNameCallback& callback);
// janky old format. Remove after a while. Phoenix. 2008-01-30
void importFile(LLFILE* fp);
@@ -89,8 +96,10 @@ public:
// If the data is currently available, may call the callback immediatly
// otherwise, will request the data, and will call the callback when
// available. There is no garuntee the callback will ever be called.
- void getNameFromUUID(const LLUUID& id, BOOL is_group, LLCacheNameCallback callback, void* user_data = NULL);
+ boost::signals2::connection get(const LLUUID& id, BOOL is_group, const LLCacheNameCallback& callback);
+ // LEGACY
+ boost::signals2::connection get(const LLUUID& id, BOOL is_group, old_callback_t callback, void* user_data);
// This method needs to be called from time to time to send out
// requests.
void processPending();
@@ -103,7 +112,8 @@ public:
void dumpStats(); // Dumps the sizes of the cache and associated queues.
static std::string getDefaultName();
-
+ static void LocalizeCacheName(std::string key, std::string value);
+ static std::map<std::string, std::string> sCacheName;
private:
class Impl;
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index 1a432cd7df..a4af8e989b 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -120,7 +120,7 @@ LLCurl::Responder::~Responder()
}
// virtual
-void LLCurl::Responder::error(
+void LLCurl::Responder::errorWithContent(
U32 status,
const std::string& reason,
const LLSD&)
@@ -161,7 +161,7 @@ void LLCurl::Responder::completed(U32 status, const std::string& reason, const L
}
else
{
- error(status, reason, content);
+ errorWithContent(status, reason, content);
}
}
diff --git a/indra/llmessage/llcurl.h b/indra/llmessage/llcurl.h
index ff63904c91..fbd3077cbf 100644
--- a/indra/llmessage/llcurl.h
+++ b/indra/llmessage/llcurl.h
@@ -85,7 +85,7 @@ public:
return((200 <= status) && (status < 300));
}
- virtual void error(
+ virtual void errorWithContent(
U32 status,
const std::string& reason,
const LLSD& content);
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index dfdad59e2a..49dbdbd56d 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -626,7 +626,7 @@ LLSD LLHTTPAssetStorage::getPendingRequest(LLAssetStorage::ERequestType rt,
const request_list_t* running = getRunningList(rt);
if (running)
{
- LLSD sd = LLAssetStorage::getPendingRequest(running, asset_type, asset_id);
+ LLSD sd = LLAssetStorage::getPendingRequestImpl(running, asset_type, asset_id);
if (sd)
{
sd["is_running"] = true;
diff --git a/indra/llmessage/llhttpassetstorage.h b/indra/llmessage/llhttpassetstorage.h
index 5786c5df32..231437dad4 100644
--- a/indra/llmessage/llhttpassetstorage.h
+++ b/indra/llmessage/llhttpassetstorage.h
@@ -62,6 +62,8 @@ public:
virtual ~LLHTTPAssetStorage();
+ using LLAssetStorage::storeAssetData; // Unhiding virtuals...
+
virtual void storeAssetData(
const LLUUID& uuid,
LLAssetType::EType atype,
diff --git a/indra/llmessage/llhttpclientadapter.cpp b/indra/llmessage/llhttpclientadapter.cpp
index 5236a52164..9d3c83f828 100644
--- a/indra/llmessage/llhttpclientadapter.cpp
+++ b/indra/llmessage/llhttpclientadapter.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llhttpclientadapter.h b/indra/llmessage/llhttpclientadapter.h
index c489dca32d..a205a2f260 100644
--- a/indra/llmessage/llhttpclientadapter.h
+++ b/indra/llmessage/llhttpclientadapter.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
@@ -33,7 +34,7 @@
#define LL_HTTPCLIENTADAPTER_H
#include "llhttpclientinterface.h"
-#include "llmemory.h" // LLSingleton<>
+#include "llsingleton.h" // LLSingleton<>
class LLHTTPClientAdapter : public LLHTTPClientInterface, public LLSingleton<LLHTTPClientAdapter>
{
diff --git a/indra/llmessage/llhttpclientinterface.h b/indra/llmessage/llhttpclientinterface.h
index 61826cc4b4..085a59cf27 100644
--- a/indra/llmessage/llhttpclientinterface.h
+++ b/indra/llmessage/llhttpclientinterface.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp
index 2ba900a533..440b91fcfa 100644
--- a/indra/llmessage/llhttpnode.cpp
+++ b/indra/llmessage/llhttpnode.cpp
@@ -98,19 +98,19 @@ namespace {
}
// virtual
-LLSD LLHTTPNode::get() const
+LLSD LLHTTPNode::simpleGet() const
{
throw NotImplemented();
}
// virtual
-LLSD LLHTTPNode::put(const LLSD& input) const
+LLSD LLHTTPNode::simplePut(const LLSD& input) const
{
throw NotImplemented();
}
// virtual
-LLSD LLHTTPNode::post(const LLSD& input) const
+LLSD LLHTTPNode::simplePost(const LLSD& input) const
{
throw NotImplemented();
}
@@ -121,7 +121,7 @@ void LLHTTPNode::get(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
{
try
{
- response->result(get());
+ response->result(simpleGet());
}
catch (NotImplemented)
{
@@ -134,7 +134,7 @@ void LLHTTPNode::put(LLHTTPNode::ResponsePtr response, const LLSD& context, cons
{
try
{
- response->result(put(input));
+ response->result(simplePut(input));
}
catch (NotImplemented)
{
@@ -147,7 +147,7 @@ void LLHTTPNode::post(LLHTTPNode::ResponsePtr response, const LLSD& context, con
{
try
{
- response->result(post(input));
+ response->result(simplePost(input));
}
catch (NotImplemented)
{
@@ -160,7 +160,7 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
{
try
{
- response->result(del(context));
+ response->result(simpleDel(context));
}
catch (NotImplemented)
{
@@ -170,7 +170,7 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons
}
// virtual
-LLSD LLHTTPNode::del(const LLSD&) const
+LLSD LLHTTPNode::simpleDel(const LLSD&) const
{
throw NotImplemented();
}
@@ -388,7 +388,7 @@ LLHTTPNode::Response::~Response()
{
}
-void LLHTTPNode::Response::status(S32 code)
+void LLHTTPNode::Response::statusUnknownError(S32 code)
{
status(code, "Unknown Error");
}
diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h
index 17ffd66e8f..915aacb7cc 100644
--- a/indra/llmessage/llhttpnode.h
+++ b/indra/llmessage/llhttpnode.h
@@ -33,7 +33,8 @@
#ifndef LL_LLHTTPNODE_H
#define LL_LLHTTPNODE_H
-#include "llmemory.h"
+#include "llpointer.h"
+#include "llrefcount.h"
#include "llsd.h"
class LLChainIOFactory;
@@ -83,10 +84,10 @@ public:
//@{
public:
- virtual LLSD get() const;
- virtual LLSD put(const LLSD& input) const;
- virtual LLSD post(const LLSD& input) const;
- virtual LLSD del(const LLSD& context) const;
+ virtual LLSD simpleGet() const;
+ virtual LLSD simplePut(const LLSD& input) const;
+ virtual LLSD simplePost(const LLSD& input) const;
+ virtual LLSD simpleDel(const LLSD& context) const;
/**
* @brief Abstract Base Class declaring Response interface.
@@ -116,7 +117,7 @@ public:
/**
* @brief Return no body, just status code and 'UNKNOWN ERROR'.
*/
- virtual void status(S32 code);
+ virtual void statusUnknownError(S32 code);
virtual void notFound(const std::string& message);
virtual void notFound();
@@ -292,6 +293,7 @@ public:
void result(const LLSD& result);
void extendedResult(S32 code, const std::string& body, const LLSD& headers);
+
void status(S32 code, const std::string& message);
void print(std::ostream& out) const;
diff --git a/indra/llmessage/llhttpnodeadapter.h b/indra/llmessage/llhttpnodeadapter.h
index 08b5664162..7c3e9d81d1 100644
--- a/indra/llmessage/llhttpnodeadapter.h
+++ b/indra/llmessage/llhttpnodeadapter.h
@@ -3,26 +3,27 @@
* @brief Declaration of llhttpnode adapter classes
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
+ *
* Copyright (c) 2009, Linden Research, Inc.
- *
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp
index 3205ddfaeb..7c63625004 100644
--- a/indra/llmessage/llinstantmessage.cpp
+++ b/indra/llmessage/llinstantmessage.cpp
@@ -41,7 +41,7 @@
#include "llsd.h"
#include "llsdserialize.h"
#include "llsdutil.h"
-#include "llmemory.h"
+#include "llpointer.h"
#include "message.h"
#include "message.h"
diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h
index 9ce6a10c80..272e753f3c 100644
--- a/indra/llmessage/llinstantmessage.h
+++ b/indra/llmessage/llinstantmessage.h
@@ -36,7 +36,8 @@
#include "llhost.h"
#include "lluuid.h"
#include "llsd.h"
-#include "llmemory.h"
+#include "llrefcount.h"
+#include "llpointer.h"
#include "v3math.h"
class LLMessageSystem;
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index ce815cc85b..97134bd336 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -105,6 +105,7 @@ private:
// from LLHTTPNode::Response
virtual void result(const LLSD&);
virtual void extendedResult(S32 code, const std::string& body, const LLSD& headers);
+
virtual void status(S32 code, const std::string& message);
void nullPipe();
diff --git a/indra/llmessage/llmessagesenderinterface.h b/indra/llmessage/llmessagesenderinterface.h
index d98d891563..af6733fa05 100644
--- a/indra/llmessage/llmessagesenderinterface.h
+++ b/indra/llmessage/llmessagesenderinterface.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
diff --git a/indra/llmessage/llpumpio.cpp b/indra/llmessage/llpumpio.cpp
index 3e3f0b37a7..5e9dfd81fa 100644
--- a/indra/llmessage/llpumpio.cpp
+++ b/indra/llmessage/llpumpio.cpp
@@ -444,11 +444,13 @@ void LLPumpIO::pump()
pump(DEFAULT_POLL_TIMEOUT);
}
+static LLFastTimer::DeclareTimer FTM_PUMP("Pump");
+
//timeout is in microseconds
void LLPumpIO::pump(const S32& poll_timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
- LLFastTimer t1(LLFastTimer::FTM_PUMP);
+ LLFastTimer t1(FTM_PUMP);
//llinfos << "LLPumpIO::pump()" << llendl;
// Run any pending runners.
diff --git a/indra/llmessage/llregionpresenceverifier.cpp b/indra/llmessage/llregionpresenceverifier.cpp
index 08c12f90da..4faad4468b 100644
--- a/indra/llmessage/llregionpresenceverifier.cpp
+++ b/indra/llmessage/llregionpresenceverifier.cpp
@@ -4,14 +4,25 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
- * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
- * this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") previously entered between you and Linden
- * Lab. By accessing, using, copying, modifying or distributing this
- * software, you acknowledge that you have been informed of your
- * obligations under the Agreement and agree to abide by those obligations.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
diff --git a/indra/llmessage/llregionpresenceverifier.h b/indra/llmessage/llregionpresenceverifier.h
index f11eeef50c..f57a62a731 100644
--- a/indra/llmessage/llregionpresenceverifier.h
+++ b/indra/llmessage/llregionpresenceverifier.h
@@ -4,14 +4,25 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
- * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
- * this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") previously entered between you and Linden
- * Lab. By accessing, using, copying, modifying or distributing this
- * software, you acknowledge that you have been informed of your
- * obligations under the Agreement and agree to abide by those obligations.
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
*
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
@@ -72,6 +83,7 @@ public:
const LLSD& content, S32 retry_count);
virtual ~VerifiedDestinationResponder();
virtual void result(const LLSD& content);
+
virtual void error(U32 status, const std::string& reason);
private:
diff --git a/indra/llmessage/llsdappservices.cpp b/indra/llmessage/llsdappservices.cpp
index dc135c51b2..b87c0cd6b7 100644
--- a/indra/llmessage/llsdappservices.cpp
+++ b/indra/llmessage/llsdappservices.cpp
@@ -56,7 +56,7 @@ public:
desc.source(__FILE__, __LINE__);
}
- virtual LLSD get() const
+ virtual LLSD simpleGet() const
{
LLSD result;
LLApp* app = LLApp::instance();
@@ -82,7 +82,7 @@ public:
desc.source(__FILE__, __LINE__);
}
- virtual LLSD get() const
+ virtual LLSD simpleGet() const
{
return LLApp::instance()->getOptionData(
LLApp::PRIORITY_RUNTIME_OVERRIDE);
diff --git a/indra/llmessage/llsdhttpserver.cpp b/indra/llmessage/llsdhttpserver.cpp
index 00fc170c59..704c375ffc 100644
--- a/indra/llmessage/llsdhttpserver.cpp
+++ b/indra/llmessage/llsdhttpserver.cpp
@@ -62,7 +62,7 @@ public:
desc.source(__FILE__, __LINE__);
}
- virtual LLSD get() const
+ virtual LLSD simpleGet() const
{
LLSD result = "hello";
return result;
@@ -86,7 +86,7 @@ public:
desc.source(__FILE__, __LINE__);
}
- virtual LLSD post(const LLSD& params) const
+ virtual LLSD simplePost(const LLSD& params) const
{
return params;
}
diff --git a/indra/llmessage/llsdmessage.cpp b/indra/llmessage/llsdmessage.cpp
index f663268466..9967a6197f 100644
--- a/indra/llmessage/llsdmessage.cpp
+++ b/indra/llmessage/llsdmessage.cpp
@@ -91,7 +91,7 @@ void LLSDMessage::EventResponder::result(const LLSD& data)
}
}
-void LLSDMessage::EventResponder::error(U32 status, const std::string& reason, const LLSD& content)
+void LLSDMessage::EventResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
{
// If our caller passed an empty errorPump name, they're not
// listening: "default error handling is acceptable." Only post to an
@@ -135,7 +135,7 @@ bool LLSDMessage::ResponderAdapter::listener(const LLSD& payload, bool success)
}
else
{
- mResponder->error(payload["status"].asInteger(), payload["reason"], payload["content"]);
+ mResponder->errorWithContent(payload["status"].asInteger(), payload["reason"], payload["content"]);
}
/*---------------- MUST BE LAST STATEMENT BEFORE RETURN ----------------*/
diff --git a/indra/llmessage/llsdmessage.h b/indra/llmessage/llsdmessage.h
index 8ae9451243..65503756a8 100644
--- a/indra/llmessage/llsdmessage.h
+++ b/indra/llmessage/llsdmessage.h
@@ -131,7 +131,7 @@ private:
{}
virtual void result(const LLSD& data);
- virtual void error(U32 status, const std::string& reason, const LLSD& content);
+ virtual void errorWithContent(U32 status, const std::string& reason, const LLSD& content);
private:
LLEventPumps& mPumps;
diff --git a/indra/llmessage/llstoredmessage.cpp b/indra/llmessage/llstoredmessage.cpp
index da6d1c84a8..d6b2f45d04 100644
--- a/indra/llmessage/llstoredmessage.cpp
+++ b/indra/llmessage/llstoredmessage.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
diff --git a/indra/llmessage/llstoredmessage.h b/indra/llmessage/llstoredmessage.h
index 6a27698b03..359e4c5aea 100644
--- a/indra/llmessage/llstoredmessage.h
+++ b/indra/llmessage/llstoredmessage.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp
index 3bbf3a058d..ab1beb362b 100644
--- a/indra/llmessage/lltemplatemessagedispatcher.cpp
+++ b/indra/llmessage/lltemplatemessagedispatcher.cpp
@@ -3,26 +3,27 @@
* @brief LLTemplateMessageDispatcher class
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltemplatemessagedispatcher.h b/indra/llmessage/lltemplatemessagedispatcher.h
index b1e74f47bb..fa861e4e42 100644
--- a/indra/llmessage/lltemplatemessagedispatcher.h
+++ b/indra/llmessage/lltemplatemessagedispatcher.h
@@ -3,26 +3,27 @@
* @brief LLTemplateMessageDispatcher class
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltemplatemessagereader.cpp b/indra/llmessage/lltemplatemessagereader.cpp
index 80ea6ce96b..8c9eb7ed42 100644
--- a/indra/llmessage/lltemplatemessagereader.cpp
+++ b/indra/llmessage/lltemplatemessagereader.cpp
@@ -531,6 +531,8 @@ void LLTemplateMessageReader::logRanOffEndOfPacket( const LLHost& host, const S3
gMessageSystem->callExceptionFunc(MX_RAN_OFF_END_OF_PACKET);
}
+static LLFastTimer::DeclareTimer FTM_PROCESS_MESSAGES("Process Messages");
+
// decode a given message
BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender )
{
@@ -714,7 +716,7 @@ BOOL LLTemplateMessageReader::decodeData(const U8* buffer, const LLHost& sender
}
{
- LLFastTimer t(LLFastTimer::FTM_PROCESS_MESSAGES);
+ LLFastTimer t(FTM_PROCESS_MESSAGES);
if( !mCurrentRMessageTemplate->callHandlerFunc(gMessageSystem) )
{
llwarns << "Message from " << sender << " with no handler function received: " << mCurrentRMessageTemplate->mName << llendl;
diff --git a/indra/llmessage/lltrustedmessageservice.cpp b/indra/llmessage/lltrustedmessageservice.cpp
index c1a6c437a7..505ece57b0 100644
--- a/indra/llmessage/lltrustedmessageservice.cpp
+++ b/indra/llmessage/lltrustedmessageservice.cpp
@@ -3,26 +3,27 @@
* @brief LLTrustedMessageService implementation
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/lltrustedmessageservice.h b/indra/llmessage/lltrustedmessageservice.h
index bc824565f1..dc37702471 100644
--- a/indra/llmessage/lltrustedmessageservice.h
+++ b/indra/llmessage/lltrustedmessageservice.h
@@ -3,26 +3,27 @@
* @brief LLTrustedMessageService class
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index 78af35bf65..e56d818d65 100644
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -86,6 +86,7 @@
#include "v3math.h"
#include "v4math.h"
#include "lltransfertargetvfile.h"
+#include "llmemtype.h"
// Constants
//const char* MESSAGE_LOG_FILENAME = "message.log";
@@ -794,6 +795,7 @@ S32 LLMessageSystem::getReceiveBytes() const
void LLMessageSystem::processAcks()
{
+ LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS);
F64 mt_sec = getMessageTimeSeconds();
{
gTransferManager.updateTransfers();
@@ -4020,6 +4022,7 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds )
// TODO: babbage: move gServicePump in to LLMessageSystem?
bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
{
+ LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL);
if(checkMessages(frame_count))
{
return true;
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index 0f3576732d..27482ca1af 100644
--- a/indra/llmessage/message.h
+++ b/indra/llmessage/message.h
@@ -59,10 +59,10 @@
#include "llhttpclient.h"
#include "llhttpnode.h"
#include "llpacketack.h"
+#include "llsingleton.h"
#include "message_prehash.h"
#include "llstl.h"
#include "llmsgvariabletype.h"
-#include "llmsgvariabletype.h"
#include "llmessagesenderinterface.h"
#include "llstoredmessage.h"
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index 30af58e430..9e3986f257 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -406,7 +406,7 @@ char* _PREHASH_GlobalX = LLMessageStringTable::getInstance()->getString("GlobalX
char* _PREHASH_GlobalY = LLMessageStringTable::getInstance()->getString("GlobalY");
char* _PREHASH_CopyRotates = LLMessageStringTable::getInstance()->getString("CopyRotates");
char* _PREHASH_KickUserAck = LLMessageStringTable::getInstance()->getString("KickUserAck");
-char* _PREHASH_TopPick = LLMessageStringTable::getInstance()->getString("TopPick");
+char* _PREHASH_TopPick = LLMessageStringTable::getInstance()->getString("TopPick"); //legacy var need to be deleted -angela
char* _PREHASH_SessionID = LLMessageStringTable::getInstance()->getString("SessionID");
char* _PREHASH_GlobalZ = LLMessageStringTable::getInstance()->getString("GlobalZ");
char* _PREHASH_DeclineFriendship = LLMessageStringTable::getInstance()->getString("DeclineFriendship");
diff --git a/indra/llmessage/tests/commtest.h b/indra/llmessage/tests/commtest.h
index 7360230451..cf1461ed2b 100644
--- a/indra/llmessage/tests/commtest.h
+++ b/indra/llmessage/tests/commtest.h
@@ -5,7 +5,30 @@
* @brief
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
* Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
diff --git a/indra/llmessage/tests/llcurl_stub.cpp b/indra/llmessage/tests/llcurl_stub.cpp
index 93653e345e..5dc5932fde 100644
--- a/indra/llmessage/tests/llcurl_stub.cpp
+++ b/indra/llmessage/tests/llcurl_stub.cpp
@@ -3,16 +3,16 @@
* @brief stub class to allow unit testing
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
- *
- * Copyright (c) 2008, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2008-2009, Linden Research, Inc.
+ *
* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
* this source code is governed by the Linden Lab Source Code Disclosure
- * Agreement ("Agreement") { }
+ * Agreement ("Agreement") previously entered between you and Linden
* Lab. By accessing, using, copying, modifying or distributing this
* software, you acknowledge that you have been informed of your
* obligations under the Agreement and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
@@ -34,7 +34,7 @@ void LLCurl::Responder::completed(U32 status, std::basic_string<char, std::char_
}
else
{
- error(status, reason, mContent);
+ errorWithContent(status, reason, mContent);
}
}
@@ -51,7 +51,7 @@ void LLCurl::Responder::completedRaw(unsigned,
{
}
-void LLCurl::Responder::error(unsigned,
+void LLCurl::Responder::errorWithContent(unsigned,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&,
LLSD const&)
{
diff --git a/indra/llmessage/tests/llhttpclientadapter_test.cpp b/indra/llmessage/tests/llhttpclientadapter_test.cpp
index bde76db08b..250fa100b6 100644
--- a/indra/llmessage/tests/llhttpclientadapter_test.cpp
+++ b/indra/llmessage/tests/llhttpclientadapter_test.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2001-2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -12,12 +12,13 @@
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
index a6f5659352..d57f17f270 100644
--- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
+++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp
@@ -3,26 +3,27 @@
* @brief LLTrustedMessageService unit tests
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/tests/lltesthttpclientadapter.cpp b/indra/llmessage/tests/lltesthttpclientadapter.cpp
index 41ce36f345..0cea4b57c2 100644
--- a/indra/llmessage/tests/lltesthttpclientadapter.cpp
+++ b/indra/llmessage/tests/lltesthttpclientadapter.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
* this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltesthttpclientadapter.h b/indra/llmessage/tests/lltesthttpclientadapter.h
index cd93bcc8c1..6f252e8510 100644
--- a/indra/llmessage/tests/lltesthttpclientadapter.h
+++ b/indra/llmessage/tests/lltesthttpclientadapter.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
* this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltestmessagesender.cpp b/indra/llmessage/tests/lltestmessagesender.cpp
index 240813a4a3..3d1876ec36 100644
--- a/indra/llmessage/tests/lltestmessagesender.cpp
+++ b/indra/llmessage/tests/lltestmessagesender.cpp
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
* this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltestmessagesender.h b/indra/llmessage/tests/lltestmessagesender.h
index 00641d1913..d3aaee8f69 100644
--- a/indra/llmessage/tests/lltestmessagesender.h
+++ b/indra/llmessage/tests/lltestmessagesender.h
@@ -4,7 +4,7 @@
*
* $LicenseInfo:firstyear=2008&license=viewergpl$
*
- * Copyright (c) 2008, Linden Research, Inc.
+ * Copyright (c) 2008-2009, Linden Research, Inc.
*
* The following source code is PROPRIETARY AND CONFIDENTIAL. Use of
* this source code is governed by the Linden Lab Source Code Disclosure
diff --git a/indra/llmessage/tests/lltrustedmessageservice_test.cpp b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
index 44595391df..0a3da4b467 100644
--- a/indra/llmessage/tests/lltrustedmessageservice_test.cpp
+++ b/indra/llmessage/tests/lltrustedmessageservice_test.cpp
@@ -3,26 +3,27 @@
* @brief LLTrustedMessageService unit tests
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
- *
- * Copyright (c) 2001-2009, Linden Research, Inc.
- *
+ *
+ * Copyright (c) 2009, Linden Research, Inc.
+ *
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
* to you under the terms of the GNU General Public License, version 2.0
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlife.com/developers/opensource/gplv2
- *
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
* There are special exceptions to the terms and conditions of the GPL as
* it is applied to this Source Code. View the full text of the exception
* in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at http://secondlife.com/developers/opensource/flossexception
- *
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
* By copying, modifying or distributing this software, you acknowledge
* that you have read and understood your obligations described above,
* and agree to abide by those obligations.
- *
+ *
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
diff --git a/indra/llmessage/tests/networkio.h b/indra/llmessage/tests/networkio.h
index 11c5cc07fc..0ebe369ea2 100644
--- a/indra/llmessage/tests/networkio.h
+++ b/indra/llmessage/tests/networkio.h
@@ -5,7 +5,30 @@
* @brief
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
+ *
* Copyright (c) 2009, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/