aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorlbsa712007-07-17 00:07:26 +0000
committerlbsa712007-07-17 00:07:26 +0000
commit47ea453b32fe8122ed2eb0d62607f65d3dbdddb8 (patch)
tree83877e94fdc053c3c0f5d2e431cbe8f49228840e /OpenSim/Region/Environment
parent* RegionApplicationBase restructuring now complete (diff)
downloadopensim-SC-47ea453b32fe8122ed2eb0d62607f65d3dbdddb8.zip
opensim-SC-47ea453b32fe8122ed2eb0d62607f65d3dbdddb8.tar.gz
opensim-SC-47ea453b32fe8122ed2eb0d62607f65d3dbdddb8.tar.bz2
opensim-SC-47ea453b32fe8122ed2eb0d62607f65d3dbdddb8.tar.xz
* debugged quite a lot of db-related strangeness and various refactoring goofs
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs13
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs55
2 files changed, 27 insertions, 41 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 671b222..5bba87a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Scenes
89 return (this.phyScene); 89 return (this.phyScene);
90 } 90 }
91 } 91 }
92 92
93 private LandManager m_LandManager; 93 private LandManager m_LandManager;
94 public LandManager LandManager 94 public LandManager LandManager
95 { 95 {
@@ -441,15 +441,8 @@ namespace OpenSim.Region.Environment.Scenes
441 /// </summary> 441 /// </summary>
442 public void LoadPrimsFromStorage() 442 public void LoadPrimsFromStorage()
443 { 443 {
444 try 444 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
445 { 445 this.localStorage.LoadPrimitives(this);
446 MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives");
447 this.localStorage.LoadPrimitives(this);
448 }
449 catch (Exception e)
450 {
451 MainLog.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
452 }
453 } 446 }
454 447
455 /// <summary> 448 /// <summary>
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index cbf69ac..4326553 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -38,7 +38,7 @@ using OpenSim.Framework;
38 38
39namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public abstract class SceneBase : IWorld 41 public abstract class SceneBase : IWorld
42 { 42 {
43 public Dictionary<LLUUID, EntityBase> Entities; 43 public Dictionary<LLUUID, EntityBase> Entities;
44 protected ulong m_regionHandle; 44 protected ulong m_regionHandle;
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
47 47
48 public TerrainEngine Terrain; 48 public TerrainEngine Terrain;
49 49
50 public string m_datastore; 50 protected string m_datastore;
51 public ILocalStorage localStorage; 51 public ILocalStorage localStorage;
52 52
53 protected object m_syncRoot = new object(); 53 protected object m_syncRoot = new object();
@@ -76,44 +76,37 @@ namespace OpenSim.Region.Environment.Scenes
76 /// <returns>Successful or not</returns> 76 /// <returns>Successful or not</returns>
77 public bool LoadStorageDLL(string dllName) 77 public bool LoadStorageDLL(string dllName)
78 { 78 {
79 try 79 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
80 { 80 ILocalStorage store = null;
81 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
82 ILocalStorage store = null;
83 81
84 foreach (Type pluginType in pluginAssembly.GetTypes()) 82 foreach (Type pluginType in pluginAssembly.GetTypes())
83 {
84 if (pluginType.IsPublic)
85 { 85 {
86 if (pluginType.IsPublic) 86 if (!pluginType.IsAbstract)
87 { 87 {
88 if (!pluginType.IsAbstract) 88 Type typeInterface = pluginType.GetInterface("ILocalStorage", true);
89 {
90 Type typeInterface = pluginType.GetInterface("ILocalStorage", true);
91 89
92 if (typeInterface != null) 90 if (typeInterface != null)
93 { 91 {
94 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); 92 ILocalStorage plug = (ILocalStorage)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
95 store = plug; 93 store = plug;
96
97 store.Initialise(this.m_datastore);
98 break;
99 }
100 94
101 typeInterface = null; 95 store.Initialise(this.m_datastore);
96 break;
102 } 97 }
98
99 typeInterface = null;
103 } 100 }
104 } 101 }
105 pluginAssembly = null;
106 this.localStorage = store;
107 return (store == null);
108 }
109 catch (Exception e)
110 {
111 MainLog.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
112 return false;
113 } 102 }
103 pluginAssembly = null;
104 this.localStorage = store;
105 return (store == null);
106
114 } 107 }
115 108
116 109
117 /// <summary> 110 /// <summary>
118 /// Send the region heightmap to the client 111 /// Send the region heightmap to the client
119 /// </summary> 112 /// </summary>
@@ -150,7 +143,7 @@ namespace OpenSim.Region.Environment.Scenes
150 /// </summary> 143 /// </summary>
151 /// <param name="agentID"></param> 144 /// <param name="agentID"></param>
152 public abstract void RemoveClient(LLUUID agentID); 145 public abstract void RemoveClient(LLUUID agentID);
153 146
154 #endregion 147 #endregion
155 148
156 /// <summary> 149 /// <summary>
@@ -190,6 +183,6 @@ namespace OpenSim.Region.Environment.Scenes
190 183
191 #endregion 184 #endregion
192 185
193 186
194 } 187 }
195} 188}