summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcachename.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-05-08 22:20:26 +0000
committerDon Kjer <don@lindenlab.com>2007-05-08 22:20:26 +0000
commita154ec72f759e20add6aacfab7f04e65b49051b9 (patch)
tree6410887f2466911a7a28574e7778d6fc7d416c67 /indra/llmessage/llcachename.cpp
parent60a09f20f450ced238afc74e806d080b3c13cc33 (diff)
svn merge -r 61343:61423 svn+ssh://svn/svn/linden/branches/maintenance into release
Diffstat (limited to 'indra/llmessage/llcachename.cpp')
-rw-r--r--indra/llmessage/llcachename.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 36cd2ce188..b2e1500859 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -508,26 +508,28 @@ void LLCacheName::get(const LLUUID& id, BOOL is_group, LLCacheNameCallback callb
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
if (entry)
{
- if (!entry->mIsGroup)
+ // id found in map therefore we can call the callback immediately.
+ if (entry->mIsGroup)
{
- callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data);
+ callback(id, entry->mGroupName, "", entry->mIsGroup, user_data);
}
else
{
- callback(id, entry->mGroupName, "", entry->mIsGroup, user_data);
+ callback(id, entry->mFirstName, entry->mLastName, entry->mIsGroup, user_data);
}
}
else
{
+ // id not found in map so we must queue the callback call until available.
if (!impl.isRequestPending(id))
{
- if (!is_group)
+ if (is_group)
{
- impl.mAskNameQueue.insert(id);
+ impl.mAskGroupQueue.insert(id);
}
else
{
- impl.mAskGroupQueue.insert(id);
+ impl.mAskNameQueue.insert(id);
}
}
impl.mReplyQueue.push_back(PendingReply(id, callback, user_data));