aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Modules
diff options
context:
space:
mode:
authorlbsa712008-03-30 21:04:45 +0000
committerlbsa712008-03-30 21:04:45 +0000
commitf52886f8f55ba6fd520cc3fffefd9a5607ad2a33 (patch)
tree484913aa8f0bde74cd42f8a7397f34390bb5bb00 /OpenSim/Region/Modules
parent* Minor cleanup (diff)
downloadopensim-SC_OLD-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.zip
opensim-SC_OLD-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.gz
opensim-SC_OLD-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.bz2
opensim-SC_OLD-f52886f8f55ba6fd520cc3fffefd9a5607ad2a33.tar.xz
* Added competely untested MSSQLMapper
* Added the new mapper to the mapper factory * Made choice of mapper configurable * This means, in hteory, that we can persist avatar appearance on MSSQL as well
Diffstat (limited to 'OpenSim/Region/Modules')
-rw-r--r--OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
index b1a138b..751e92e 100644
--- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs
@@ -220,14 +220,22 @@ namespace OpenSim.Region.Modules.AvatarFactory
220 try 220 try
221 { 221 {
222 m_enablePersist = source.Configs["Startup"].GetBoolean("appearance_persist", false); 222 m_enablePersist = source.Configs["Startup"].GetBoolean("appearance_persist", false);
223 m_connectionString = source.Configs["Startup"].GetString("appearance_connection_string", "");
224 } 223 }
225 catch (Exception) 224 catch (Exception)
226 { 225 {
227 } 226 }
228 if (m_enablePersist) 227 if (m_enablePersist)
229 { 228 {
230 m_databaseMapper = DataMapperFactory.GetDataBaseMapper(DataMapperFactory.MAPPER_TYPE.MYSQL, m_connectionString); 229 m_connectionString = source.Configs["Startup"].GetString("appearance_connection_string", "");
230
231 string mapperTypeStr = source.Configs["Startup"].GetString("appearance_database", "MYSQL");
232
233 DataMapperFactory.MAPPER_TYPE mapperType =
234 (DataMapperFactory.MAPPER_TYPE)
235 Enum.Parse(typeof (DataMapperFactory.MAPPER_TYPE), mapperTypeStr);
236
237 m_databaseMapper = DataMapperFactory.GetDataBaseMapper(mapperType, m_connectionString);
238
231 m_appearanceMapper = new AppearanceTableMapper(m_databaseMapper, "AvatarAppearance"); 239 m_appearanceMapper = new AppearanceTableMapper(m_databaseMapper, "AvatarAppearance");
232 } 240 }
233 } 241 }