diff options
author | Melanie | 2013-06-06 03:04:47 +0100 |
---|---|---|
committer | Melanie | 2013-06-06 03:04:47 +0100 |
commit | ea9e1d1a1e0da0bab23d899b29672a0e7c7d8ad0 (patch) | |
tree | 876269c05bbc4be96ee8bdff2970cdfea0db61bc /OpenSim/Region/CoreModules | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Prevent processing for Npc (diff) | |
download | opensim-SC-ea9e1d1a1e0da0bab23d899b29672a0e7c7d8ad0.zip opensim-SC-ea9e1d1a1e0da0bab23d899b29672a0e7c7d8ad0.tar.gz opensim-SC-ea9e1d1a1e0da0bab23d899b29672a0e7c7d8ad0.tar.bz2 opensim-SC-ea9e1d1a1e0da0bab23d899b29672a0e7c7d8ad0.tar.xz |
Merge commit 'e449950030decf7e65e7d9b334ddaed25c1bd629' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 5b228ee..a97c9b4 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -169,6 +169,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
169 | 169 | ||
170 | void HandleOnMakeRootAgent (ScenePresence obj) | 170 | void HandleOnMakeRootAgent (ScenePresence obj) |
171 | { | 171 | { |
172 | if(obj.PresenceType == PresenceType.Npc) | ||
173 | return; | ||
174 | |||
172 | GetImageAssets(((IScenePresence)obj).UUID); | 175 | GetImageAssets(((IScenePresence)obj).UUID); |
173 | } | 176 | } |
174 | 177 | ||
@@ -326,14 +329,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
326 | string name = m["name"].AsString(); | 329 | string name = m["name"].AsString(); |
327 | 330 | ||
328 | classifieds[cid] = name; | 331 | classifieds[cid] = name; |
329 | 332 | ||
330 | if(!classifiedCache.ContainsKey(cid)) | 333 | if(!classifiedCache.ContainsKey(cid)) |
331 | { | 334 | { |
332 | classifiedCache.Add(cid,creatorId); | 335 | lock(classifiedCache) |
333 | classifiedInterest.Add(cid, 0); | 336 | classifiedCache.Add(cid,creatorId); |
337 | lock(classifiedInterest) | ||
338 | classifiedInterest.Add(cid, 0); | ||
334 | } | 339 | } |
335 | 340 | ||
336 | classifiedInterest[cid] ++; | 341 | lock(classifiedInterest) |
342 | classifiedInterest[cid] ++; | ||
337 | } | 343 | } |
338 | 344 | ||
339 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); | 345 | remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); |
@@ -346,22 +352,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles | |||
346 | ad.ClassifiedId = queryClassifiedID; | 352 | ad.ClassifiedId = queryClassifiedID; |
347 | 353 | ||
348 | if(classifiedCache.ContainsKey(queryClassifiedID)) | 354 | if(classifiedCache.ContainsKey(queryClassifiedID)) |
349 | { | 355 | { |
350 | target = classifiedCache[queryClassifiedID]; | 356 | target = classifiedCache[queryClassifiedID]; |
351 | 357 | ||
352 | if(classifiedInterest[queryClassifiedID] -- == 0) | 358 | lock(classifiedInterest) |
359 | classifiedInterest[queryClassifiedID] --; | ||
360 | |||
361 | if(classifiedInterest[queryClassifiedID] == 0) | ||
353 | { | 362 | { |
363 | lock(classifiedInterest) | ||
364 | classifiedInterest.Remove(queryClassifiedID); | ||
354 | lock(classifiedCache) | 365 | lock(classifiedCache) |
355 | { | ||
356 | lock(classifiedInterest) | ||
357 | { | ||
358 | classifiedInterest.Remove(queryClassifiedID); | ||
359 | } | ||
360 | classifiedCache.Remove(queryClassifiedID); | 366 | classifiedCache.Remove(queryClassifiedID); |
361 | } | ||
362 | } | 367 | } |
363 | } | 368 | } |
364 | |||
365 | 369 | ||
366 | string serverURI = string.Empty; | 370 | string serverURI = string.Empty; |
367 | bool foreign = GetUserProfileServerURI(target, out serverURI); | 371 | bool foreign = GetUserProfileServerURI(target, out serverURI); |