aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs27
1 files changed, 13 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index d7ffea8..161f160 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -331,17 +331,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
331 331
332 classifieds[cid] = name; 332 classifieds[cid] = name;
333 333
334 if (!m_classifiedCache.ContainsKey(cid)) 334 lock (m_classifiedCache)
335 { 335 {
336 lock(m_classifiedCache) 336 if (!m_classifiedCache.ContainsKey(cid))
337 {
337 m_classifiedCache.Add(cid,creatorId); 338 m_classifiedCache.Add(cid,creatorId);
338
339 lock(m_classifiedInterest)
340 m_classifiedInterest.Add(cid, 0); 339 m_classifiedInterest.Add(cid, 0);
341 } 340 }
342 341
343 lock(m_classifiedInterest)
344 m_classifiedInterest[cid]++; 342 m_classifiedInterest[cid]++;
343 }
345 } 344 }
346 345
347 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); 346 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds);
@@ -353,19 +352,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
353 UserClassifiedAdd ad = new UserClassifiedAdd(); 352 UserClassifiedAdd ad = new UserClassifiedAdd();
354 ad.ClassifiedId = queryClassifiedID; 353 ad.ClassifiedId = queryClassifiedID;
355 354
356 if (m_classifiedCache.ContainsKey(queryClassifiedID)) 355 lock (m_classifiedCache)
357 { 356 {
358 target = m_classifiedCache[queryClassifiedID]; 357 if (m_classifiedCache.ContainsKey(queryClassifiedID))
358 {
359 target = m_classifiedCache[queryClassifiedID];
359 360
360 lock(m_classifiedInterest)
361 m_classifiedInterest[queryClassifiedID] --; 361 m_classifiedInterest[queryClassifiedID] --;
362 362
363 if(m_classifiedInterest[queryClassifiedID] == 0) 363 if (m_classifiedInterest[queryClassifiedID] == 0)
364 { 364 {
365 lock(m_classifiedInterest)
366 m_classifiedInterest.Remove(queryClassifiedID); 365 m_classifiedInterest.Remove(queryClassifiedID);
367 lock(m_classifiedCache)
368 m_classifiedCache.Remove(queryClassifiedID); 366 m_classifiedCache.Remove(queryClassifiedID);
367 }
369 } 368 }
370 } 369 }
371 370