aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2009-10-10 10:26:47 +0100
committerMelanie2009-10-10 10:26:47 +0100
commit5e6e31591cfc17746f9b1d837d3cc2045c9f7766 (patch)
tree568f45c145bf4ed1396de8df145a95ff8b947427 /OpenSim/Framework
parent* Changed the "Packet exceeded buffer size" log line to debug and include the... (diff)
parentFix selling objects (diff)
downloadopensim-SC_OLD-5e6e31591cfc17746f9b1d837d3cc2045c9f7766.zip
opensim-SC_OLD-5e6e31591cfc17746f9b1d837d3cc2045c9f7766.tar.gz
opensim-SC_OLD-5e6e31591cfc17746f9b1d837d3cc2045c9f7766.tar.bz2
opensim-SC_OLD-5e6e31591cfc17746f9b1d837d3cc2045c9f7766.tar.xz
Merge branch 'master' into htb-throttle
This is hand-edited to not let master changes creep into here and may cause a somewhat rocky merge to master later.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs35
1 files changed, 12 insertions, 23 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 2410f31..4bf9018 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -209,35 +209,24 @@ namespace OpenSim.Framework.Communications
209 209
210 private string[] doUUIDNameRequest(UUID uuid) 210 private string[] doUUIDNameRequest(UUID uuid)
211 { 211 {
212 string[] returnstring = new string[0];
213 bool doLookup = false;
214
215 lock (m_nameRequestCache) 212 lock (m_nameRequestCache)
216 { 213 {
217 if (m_nameRequestCache.ContainsKey(uuid)) 214 if (m_nameRequestCache.ContainsKey(uuid))
218 { 215 return m_nameRequestCache[uuid];
219 returnstring = m_nameRequestCache[uuid];
220 }
221 else
222 {
223 // we don't want to lock the dictionary while we're doing the lookup
224 doLookup = true;
225 }
226 } 216 }
227 217
228 if (doLookup) { 218 string[] returnstring = new string[0];
229 UserProfileData profileData = m_userService.GetUserProfile(uuid); 219 CachedUserInfo uinfo = UserProfileCacheService.GetUserDetails(uuid);
230 if (profileData != null) 220
221 if ((uinfo != null) && (uinfo.UserProfile != null))
222 {
223 returnstring = new string[2];
224 returnstring[0] = uinfo.UserProfile.FirstName;
225 returnstring[1] = uinfo.UserProfile.SurName;
226 lock (m_nameRequestCache)
231 { 227 {
232 returnstring = new string[2]; 228 if (!m_nameRequestCache.ContainsKey(uuid))
233 // UUID profileId = profileData.ID; 229 m_nameRequestCache.Add(uuid, returnstring);
234 returnstring[0] = profileData.FirstName;
235 returnstring[1] = profileData.SurName;
236 lock (m_nameRequestCache)
237 {
238 if (!m_nameRequestCache.ContainsKey(uuid))
239 m_nameRequestCache.Add(uuid, returnstring);
240 }
241 } 230 }
242 } 231 }
243 232