aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-14 11:10:43 +0000
committerJustin Clarke Casey2008-02-14 11:10:43 +0000
commit12295037642b5c13c46d1339766ada46e1ce3616 (patch)
tree13444e01a45f5ea90ccbe7b373ebe69769456d01 /OpenSim
parent* Removed the noise from the console. The last commit seems to have resolve... (diff)
downloadopensim-SC_OLD-12295037642b5c13c46d1339766ada46e1ce3616.zip
opensim-SC_OLD-12295037642b5c13c46d1339766ada46e1ce3616.tar.gz
opensim-SC_OLD-12295037642b5c13c46d1339766ada46e1ce3616.tar.bz2
opensim-SC_OLD-12295037642b5c13c46d1339766ada46e1ce3616.tar.xz
Revert the index -> Add changes made in AvatarFactoryModule previously. It appears that in conjunction with MW's locking changes, that two threads may race to create the avatar
appearance in the TryGetAvatarAppearance() method. Moving off Add will mean the second replaces the first instead of throwing the exception. This may still not be a good permanent solution - more extensively locking or a code rearrangement could be better. I'm going to leave this in MW's much more familiar hands now.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index 6042a54..d7f23f8 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules
72 appearance.TextureEntry = AvatarAppearance.GetDefaultTextureEntry(); 72 appearance.TextureEntry = AvatarAppearance.GetDefaultTextureEntry();
73 lock (m_avatarsAppearance) 73 lock (m_avatarsAppearance)
74 { 74 {
75 m_avatarsAppearance.Add(avatarId, appearance); 75 m_avatarsAppearance[avatarId] = appearance;
76 } 76 }
77 return true; 77 return true;
78 } 78 }
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules
87 //add appearance to dictionary cache 87 //add appearance to dictionary cache
88 lock (m_avatarsAppearance) 88 lock (m_avatarsAppearance)
89 { 89 {
90 m_avatarsAppearance.Add(avatarId, appearance); 90 m_avatarsAppearance[avatarId] = appearance;
91 } 91 }
92 92
93 //update database 93 //update database