summaryrefslogtreecommitdiff
path: root/indra/llmessage/llavatarnamecache.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-08-20 14:45:47 -0400
committerOz Linden <oz@lindenlab.com>2012-08-20 14:45:47 -0400
commitc2e902d56ac5d6b6109c1b12254c62ec18ad2199 (patch)
treeeccb10bb1f2a558270fef9faa87ef1333e2f501a /indra/llmessage/llavatarnamecache.cpp
parent7204593ec3f6fca63c32bcb8cdcf9c356165d24e (diff)
parent2d28bc112a2db73b521d44e12b3c633cf8eccd7e (diff)
merge back beta fixes
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
-rw-r--r--indra/llmessage/llavatarnamecache.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index fbc3cc6de2..32d9d8bfc3 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -657,8 +657,10 @@ void LLAvatarNameCache::fireSignal(const LLUUID& agent_id,
signal(agent_id, av_name);
}
-void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
+LLAvatarNameCache::callback_connection_t LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
{
+ callback_connection_t connection;
+
if (sRunning)
{
// ...only do immediate lookups when cache is running
@@ -674,7 +676,7 @@ void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
{
// ...name already exists in cache, fire callback now
fireSignal(agent_id, slot, av_name);
- return;
+ return connection;
}
}
}
@@ -687,7 +689,7 @@ void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
LLAvatarName av_name;
buildLegacyName(full_name, &av_name);
fireSignal(agent_id, slot, av_name);
- return;
+ return connection;
}
}
}
@@ -704,15 +706,17 @@ void LLAvatarNameCache::get(const LLUUID& agent_id, callback_slot_t slot)
{
// ...new callback for this id
callback_signal_t* signal = new callback_signal_t();
- signal->connect(slot);
+ connection = signal->connect(slot);
sSignalMap[agent_id] = signal;
}
else
{
// ...existing callback, bind additional slot
callback_signal_t* signal = sig_it->second;
- signal->connect(slot);
+ connection = signal->connect(slot);
}
+
+ return connection;
}