aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs2
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs66
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Access/AccessModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs24
9 files changed, 104 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
index 1903eb9..b1b7b27 100644
--- a/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/CenomeAssetCache.cs
@@ -330,7 +330,7 @@ namespace OpenSim.Region.CoreModules.Asset
330 //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name); 330 //m_log.DebugFormat("[XXX] name = {0} (this module's name: {1}", name, Name);
331 331
332 if (name != Name) 332 if (name != Name)
333 return; 333 return;
334 334
335 long maxSize = DefaultMaxSize; 335 long maxSize = DefaultMaxSize;
336 int maxCount = DefaultMaxCount; 336 int maxCount = DefaultMaxCount;
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index 9216e0b..967c0a1 100644
--- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
+++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
@@ -69,7 +69,7 @@ namespace Flotsam.RegionModules.AssetCache
69 69
70 private readonly List<char> m_InvalidChars = new List<char>(); 70 private readonly List<char> m_InvalidChars = new List<char>();
71 71
72 private int m_LogLevel = 1; 72 private int m_LogLevel = 0;
73 private ulong m_HitRateDisplay = 1; // How often to display hit statistics, given in requests 73 private ulong m_HitRateDisplay = 1; // How often to display hit statistics, given in requests
74 74
75 private static ulong m_Requests; 75 private static ulong m_Requests;
@@ -156,7 +156,7 @@ namespace Flotsam.RegionModules.AssetCache
156 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000); 156 m_WaitOnInprogressTimeout = assetConfig.GetInt("WaitOnInprogressTimeout", 3000);
157#endif 157#endif
158 158
159 m_LogLevel = assetConfig.GetInt("LogLevel", 1); 159 m_LogLevel = assetConfig.GetInt("LogLevel", 0);
160 m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1000); 160 m_HitRateDisplay = (ulong)assetConfig.GetInt("HitRateDisplay", 1000);
161 161
162 m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration)); 162 m_FileExpiration = TimeSpan.FromHours(assetConfig.GetDouble("FileCacheTimeout", m_DefaultFileExpiration));
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index 0bd68dd..3614915 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
159 avatar.Invulnerable = true; 159 avatar.Invulnerable = true;
160 } 160 }
161 } 161 }
162 catch (Exception ex) 162 catch (Exception)
163 { 163 {
164 } 164 }
165 } 165 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index b055f8b..71b3062 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -131,7 +131,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
131 { 131 {
132 if (CheckPresence(userInfo.PrincipalID)) 132 if (CheckPresence(userInfo.PrincipalID))
133 { 133 {
134 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(); 134 try
135 {
136 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute();
137 }
138 catch (EntryPointNotFoundException e)
139 {
140 m_log.ErrorFormat(
141 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
142 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
143 m_log.Error(e);
144
145 return false;
146 }
147
135 return true; 148 return true;
136 } 149 }
137 else 150 else
@@ -156,7 +169,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
156 { 169 {
157 if (CheckPresence(userInfo.PrincipalID)) 170 if (CheckPresence(userInfo.PrincipalID))
158 { 171 {
159 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(); 172 try
173 {
174 new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute();
175 }
176 catch (EntryPointNotFoundException e)
177 {
178 m_log.ErrorFormat(
179 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
180 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
181 m_log.Error(e);
182
183 return false;
184 }
185
160 return true; 186 return true;
161 } 187 }
162 else 188 else
@@ -181,8 +207,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
181 { 207 {
182 if (CheckPresence(userInfo.PrincipalID)) 208 if (CheckPresence(userInfo.PrincipalID))
183 { 209 {
184 InventoryArchiveReadRequest request = 210 InventoryArchiveReadRequest request;
185 new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream); 211
212 try
213 {
214 request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream);
215 }
216 catch (EntryPointNotFoundException e)
217 {
218 m_log.ErrorFormat(
219 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
220 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
221 m_log.Error(e);
222
223 return false;
224 }
225
186 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 226 UpdateClientWithLoadedNodes(userInfo, request.Execute());
187 227
188 return true; 228 return true;
@@ -209,8 +249,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
209 { 249 {
210 if (CheckPresence(userInfo.PrincipalID)) 250 if (CheckPresence(userInfo.PrincipalID))
211 { 251 {
212 InventoryArchiveReadRequest request = 252 InventoryArchiveReadRequest request;
213 new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath); 253
254 try
255 {
256 request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath);
257 }
258 catch (EntryPointNotFoundException e)
259 {
260 m_log.ErrorFormat(
261 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
262 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
263 m_log.Error(e);
264
265 return false;
266 }
267
214 UpdateClientWithLoadedNodes(userInfo, request.Execute()); 268 UpdateClientWithLoadedNodes(userInfo, request.Execute());
215 269
216 return true; 270 return true;
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
index 2f21e6d..50348da 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset
224 m_Cache.Cache(a); 224 m_Cache.Cache(a);
225 225
226// if (null == a) 226// if (null == a)
227// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id); 227// m_log.WarnFormat("[LOCAL ASSET SERVICES CONNECTOR]: Could not asynchronously find asset with id {0}", id);
228 228
229 Util.FireAndForget(delegate { handler(assetID, s, a); }); 229 Util.FireAndForget(delegate { handler(assetID, s, a); });
230 }); 230 });
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
index 127469e..c355b13 100644
--- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
+++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.World
108 { 108 {
109 foreach (Scene s in m_SceneList) 109 foreach (Scene s in m_SceneList)
110 { 110 {
111 if(!ProcessCommand(s, cmd)) 111 if (!ProcessCommand(s, cmd))
112 break; 112 break;
113 } 113 }
114 } 114 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 59a1b8f..08dfb75 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -74,7 +74,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
74 public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId) 74 public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId)
75 { 75 {
76 m_scene = scene; 76 m_scene = scene;
77 m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); 77
78 try
79 {
80 m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress);
81 }
82 catch (EntryPointNotFoundException e)
83 {
84 m_log.ErrorFormat(
85 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
86 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
87 m_log.Error(e);
88 }
89
78 m_errorMessage = String.Empty; 90 m_errorMessage = String.Empty;
79 m_merge = merge; 91 m_merge = merge;
80 m_requestId = requestId; 92 m_requestId = requestId;
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 71bfe57..b61b341 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -65,7 +65,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
65 public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) 65 public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId)
66 { 66 {
67 m_scene = scene; 67 m_scene = scene;
68 m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress); 68
69 try
70 {
71 m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress);
72 }
73 catch (EntryPointNotFoundException e)
74 {
75 m_log.ErrorFormat(
76 "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream."
77 + "If you've manually installed Mono, have you appropriately updated zlib1g as well?");
78 m_log.Error(e);
79 }
80
69 m_requestId = requestId; 81 m_requestId = requestId;
70 } 82 }
71 83
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 18f77fd..de16d89 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
99 Quaternion rotationOffset = new Quaternion(20, 30, 40, 50); 99 Quaternion rotationOffset = new Quaternion(20, 30, 40, 50);
100 Vector3 offsetPosition = new Vector3(5, 10, 15); 100 Vector3 offsetPosition = new Vector3(5, 10, 15);
101 101
102 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName }; 102 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
103 } 103 }
104 104
105 protected SceneObjectPart CreateSceneObjectPart2() 105 protected SceneObjectPart CreateSceneObjectPart2()
@@ -112,7 +112,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
112 Vector3 offsetPosition = new Vector3(20, 25, 30); 112 Vector3 offsetPosition = new Vector3(20, 25, 30);
113 113
114 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName }; 114 return new SceneObjectPart(ownerId, shape, groupPosition, rotationOffset, offsetPosition) { Name = partName };
115 } 115 }
116 116
117 /// <summary> 117 /// <summary>
118 /// Test saving a V0.2 OpenSim Region Archive. 118 /// Test saving a V0.2 OpenSim Region Archive.
@@ -231,7 +231,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
231 foreach (string name in names) 231 foreach (string name in names)
232 { 232 {
233 if (name.EndsWith(".Resources.test-sound.wav")) 233 if (name.EndsWith(".Resources.test-sound.wav"))
234 soundDataResourceName = name; 234 soundDataResourceName = name;
235 } 235 }
236 Assert.That(soundDataResourceName, Is.Not.Null); 236 Assert.That(soundDataResourceName, Is.Not.Null);
237 237
@@ -259,7 +259,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
259 = new TaskInventoryItem { AssetID = soundUuid, ItemID = soundItemUuid, Name = soundItemName }; 259 = new TaskInventoryItem { AssetID = soundUuid, ItemID = soundItemUuid, Name = soundItemName };
260 part1.Inventory.AddInventoryItem(item1, true); 260 part1.Inventory.AddInventoryItem(item1, true);
261 } 261 }
262 } 262 }
263 263
264 m_scene.AddNewSceneObject(object1, false); 264 m_scene.AddNewSceneObject(object1, false);
265 265
@@ -306,15 +306,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
306 /// Test loading the region settings of a V0.2 OpenSim Region Archive. 306 /// Test loading the region settings of a V0.2 OpenSim Region Archive.
307 /// </summary> 307 /// </summary>
308 [Test] 308 [Test]
309 public void TestLoadOarV0_2RegionSettings() 309 public void TestLoadOarV0_2RegionSettings()
310 { 310 {
311 TestHelper.InMethod(); 311 TestHelper.InMethod();
312 //log4net.Config.XmlConfigurator.Configure(); 312 //log4net.Config.XmlConfigurator.Configure();
313 313
314 MemoryStream archiveWriteStream = new MemoryStream(); 314 MemoryStream archiveWriteStream = new MemoryStream();
315 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); 315 TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream);
316 316
317 tar.WriteDir(ArchiveConstants.TERRAINS_PATH); 317 tar.WriteDir(ArchiveConstants.TERRAINS_PATH);
318 tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile()); 318 tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestExecution.Create0p2ControlFile());
319 319
320 RegionSettings rs = new RegionSettings(); 320 RegionSettings rs = new RegionSettings();
@@ -329,11 +329,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
329 rs.DisablePhysics = true; 329 rs.DisablePhysics = true;
330 rs.DisableScripts = true; 330 rs.DisableScripts = true;
331 rs.Elevation1NW = 15.9; 331 rs.Elevation1NW = 15.9;
332 rs.Elevation1NE = 45.3; 332 rs.Elevation1NE = 45.3;
333 rs.Elevation1SE = 49; 333 rs.Elevation1SE = 49;
334 rs.Elevation1SW = 1.9; 334 rs.Elevation1SW = 1.9;
335 rs.Elevation2NW = 4.5; 335 rs.Elevation2NW = 4.5;
336 rs.Elevation2NE = 19.2; 336 rs.Elevation2NE = 19.2;
337 rs.Elevation2SE = 9.2; 337 rs.Elevation2SE = 9.2;
338 rs.Elevation2SW = 2.1; 338 rs.Elevation2SW = 2.1;
339 rs.FixedSun = true; 339 rs.FixedSun = true;
@@ -411,7 +411,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
411// Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90); 411// Quaternion part2RotationOffset = new Quaternion(60, 70, 80, 90);
412// Vector3 part2OffsetPosition = new Vector3(20, 25, 30); 412// Vector3 part2OffsetPosition = new Vector3(20, 25, 30);
413 413
414 SceneObjectPart part2 = CreateSceneObjectPart2(); 414 SceneObjectPart part2 = CreateSceneObjectPart2();
415 415
416 // Create an oar file that we can use for the merge 416 // Create an oar file that we can use for the merge
417 { 417 {
@@ -420,9 +420,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
420 TerrainModule terrainModule = new TerrainModule(); 420 TerrainModule terrainModule = new TerrainModule();
421 421
422 Scene scene = SceneSetupHelpers.SetupScene(); 422 Scene scene = SceneSetupHelpers.SetupScene();
423 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule); 423 SceneSetupHelpers.SetupSceneModules(scene, archiverModule, serialiserModule, terrainModule);
424 424
425 m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false); 425 m_scene.AddNewSceneObject(new SceneObjectGroup(part2), false);
426 426
427 // Write out this scene 427 // Write out this scene
428 scene.EventManager.OnOarFileSaved += SaveCompleted; 428 scene.EventManager.OnOarFileSaved += SaveCompleted;