aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-15 00:41:02 +0100
committerJustin Clark-Casey (justincc)2013-06-15 00:41:02 +0100
commit9c530d725f13da91caffdbce2759d58a456afff5 (patch)
tree199d9a88ac1e569021bcb95bf343fccaa45aca2e /OpenSim/Region
parentAdd the standard OpenSimulator copyright notice to the top of InventoryCache.cs (diff)
downloadopensim-SC_OLD-9c530d725f13da91caffdbce2759d58a456afff5.zip
opensim-SC_OLD-9c530d725f13da91caffdbce2759d58a456afff5.tar.gz
opensim-SC_OLD-9c530d725f13da91caffdbce2759d58a456afff5.tar.bz2
opensim-SC_OLD-9c530d725f13da91caffdbce2759d58a456afff5.tar.xz
refactor: In UserProfileModule, change classifiedCache and classifiedInterest to m_classifiedCache and m_classifiedInterest
This is the coding standard name style for private fields.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs42
1 files changed, 23 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 322addd..97bb781 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -60,8 +60,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
60 // The pair of Dictionaries are used to handle the switching of classified ads 60 // The pair of Dictionaries are used to handle the switching of classified ads
61 // by maintaining a cache of classified id to creator id mappings and an interest 61 // by maintaining a cache of classified id to creator id mappings and an interest
62 // count. The entries are removed when the interest count reaches 0. 62 // count. The entries are removed when the interest count reaches 0.
63 Dictionary<UUID,UUID> classifiedCache = new Dictionary<UUID, UUID>(); 63 Dictionary<UUID,UUID> m_classifiedCache = new Dictionary<UUID, UUID>();
64 Dictionary<UUID,int> classifiedInterest = new Dictionary<UUID, int>(); 64 Dictionary<UUID,int> m_classifiedInterest = new Dictionary<UUID, int>();
65 65
66 public Scene Scene 66 public Scene Scene
67 { 67 {
@@ -331,16 +331,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
331 331
332 classifieds[cid] = name; 332 classifieds[cid] = name;
333 333
334 if(!classifiedCache.ContainsKey(cid)) 334 lock(m_classifiedCache)
335 { 335 {
336 lock(classifiedCache) 336 if (!m_classifiedCache.ContainsKey(cid))
337 classifiedCache.Add(cid,creatorId); 337 {
338 lock(classifiedInterest) 338 m_classifiedCache.Add(cid,creatorId);
339 classifiedInterest.Add(cid, 0); 339
340 lock(m_classifiedInterest)
341 m_classifiedInterest.Add(cid, 0);
342 }
340 } 343 }
341 344
342 lock(classifiedInterest) 345 lock(m_classifiedInterest)
343 classifiedInterest[cid] ++; 346 m_classifiedInterest[cid]++;
344 } 347 }
345 348
346 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds); 349 remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), classifieds);
@@ -352,19 +355,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
352 UserClassifiedAdd ad = new UserClassifiedAdd(); 355 UserClassifiedAdd ad = new UserClassifiedAdd();
353 ad.ClassifiedId = queryClassifiedID; 356 ad.ClassifiedId = queryClassifiedID;
354 357
355 if(classifiedCache.ContainsKey(queryClassifiedID)) 358 lock (classifie
359 if (m_classifiedCache.ContainsKey(queryClassifiedID))
356 { 360 {
357 target = classifiedCache[queryClassifiedID]; 361 target = m_classifiedCache[queryClassifiedID];
358 362
359 lock(classifiedInterest) 363 lock(m_classifiedInterest)
360 classifiedInterest[queryClassifiedID] --; 364 m_classifiedInterest[queryClassifiedID] --;
361 365
362 if(classifiedInterest[queryClassifiedID] == 0) 366 if(m_classifiedInterest[queryClassifiedID] == 0)
363 { 367 {
364 lock(classifiedInterest) 368 lock(m_classifiedInterest)
365 classifiedInterest.Remove(queryClassifiedID); 369 m_classifiedInterest.Remove(queryClassifiedID);
366 lock(classifiedCache) 370 lock(m_classifiedCache)
367 classifiedCache.Remove(queryClassifiedID); 371 m_classifiedCache.Remove(queryClassifiedID);
368 } 372 }
369 } 373 }
370 374
@@ -1339,4 +1343,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
1339 } 1343 }
1340 #endregion Web Util 1344 #endregion Web Util
1341 } 1345 }
1342} 1346} \ No newline at end of file