diff options
8 files changed, 61 insertions, 60 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs index 933fa12..2bb0926 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/UserProfileCacheServiceTests.cs | |||
@@ -330,5 +330,16 @@ namespace OpenSim.Framework.Communications.Tests | |||
330 | Assert.That(rootFolder.RequestListOfFolders(), Is.Empty); | 330 | Assert.That(rootFolder.RequestListOfFolders(), Is.Empty); |
331 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Null); | 331 | Assert.That(myScene.InventoryService.GetFolder(myFolder), Is.Null); |
332 | } | 332 | } |
333 | |||
334 | [TearDown] | ||
335 | public void TearDown() | ||
336 | { | ||
337 | try | ||
338 | { | ||
339 | if (MainServer.Instance != null) MainServer.Instance.Stop(); | ||
340 | } | ||
341 | catch (System.NullReferenceException) | ||
342 | { } | ||
343 | } | ||
333 | } | 344 | } |
334 | } \ No newline at end of file | 345 | } \ No newline at end of file |
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 57a908e..0a9d2ae 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -362,6 +362,16 @@ namespace OpenSim.Framework.Communications.Tests | |||
362 | //Console.WriteLine("Finished T023_TestAuthenticatedLoginAlreadyLoggedIn()"); | 362 | //Console.WriteLine("Finished T023_TestAuthenticatedLoginAlreadyLoggedIn()"); |
363 | } | 363 | } |
364 | 364 | ||
365 | [TearDown] | ||
366 | public void TearDown() | ||
367 | { | ||
368 | try | ||
369 | { | ||
370 | if (MainServer.Instance != null) MainServer.Instance.Stop(); | ||
371 | } catch (NullReferenceException) | ||
372 | {} | ||
373 | } | ||
374 | |||
365 | public class TestLoginToRegionConnector : ILoginServiceToRegionsConnector | 375 | public class TestLoginToRegionConnector : ILoginServiceToRegionsConnector |
366 | { | 376 | { |
367 | private List<RegionInfo> m_regionsList = new List<RegionInfo>(); | 377 | private List<RegionInfo> m_regionsList = new List<RegionInfo>(); |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 75c9310..771ae05 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -1637,13 +1637,20 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1637 | public void Stop() | 1637 | public void Stop() |
1638 | { | 1638 | { |
1639 | HTTPDRunning = false; | 1639 | HTTPDRunning = false; |
1640 | m_httpListener2.ExceptionThrown -= httpServerException; | 1640 | try |
1641 | //m_httpListener2.DisconnectHandler = null; | 1641 | { |
1642 | 1642 | m_httpListener2.ExceptionThrown -= httpServerException; | |
1643 | m_httpListener2.LogWriter = null; | 1643 | //m_httpListener2.DisconnectHandler = null; |
1644 | m_httpListener2.RequestReceived -= OnRequest; | ||
1645 | 1644 | ||
1646 | m_httpListener2.Stop(); | 1645 | m_httpListener2.LogWriter = null; |
1646 | m_httpListener2.RequestReceived -= OnRequest; | ||
1647 | m_httpListener2.Stop(); | ||
1648 | } | ||
1649 | catch (NullReferenceException) | ||
1650 | { | ||
1651 | m_log.Warn("[BASEHTTPSERVER]: Null Reference when stopping HttpServer."); | ||
1652 | } | ||
1653 | |||
1647 | } | 1654 | } |
1648 | 1655 | ||
1649 | public void RemoveStreamHandler(string httpMethod, string path) | 1656 | public void RemoveStreamHandler(string httpMethod, string path) |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index c7723f1..c91b63e 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -53,57 +53,6 @@ using OpenSim.Services.Interfaces; | |||
53 | 53 | ||
54 | namespace Flotsam.RegionModules.AssetCache | 54 | namespace Flotsam.RegionModules.AssetCache |
55 | { | 55 | { |
56 | /// <summary> | ||
57 | /// OpenSim.ini Options: | ||
58 | /// ------- | ||
59 | /// [Modules] | ||
60 | /// AssetCaching = "FlotsamAssetCache" | ||
61 | /// | ||
62 | /// [AssetCache] | ||
63 | /// ; cache directory can be shared by multiple instances | ||
64 | /// CacheDirectory = /directory/writable/by/OpenSim/instance | ||
65 | /// | ||
66 | /// ; Log level | ||
67 | /// ; 0 - (Error) Errors only | ||
68 | /// ; 1 - (Info) Hit Rate Stats + Level 0 | ||
69 | /// ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 | ||
70 | /// ; | ||
71 | /// LogLevel = 1 | ||
72 | /// | ||
73 | /// ; How often should hit rates be displayed (given in AssetRequests) | ||
74 | /// ; 0 to disable | ||
75 | /// HitRateDisplay = 100 | ||
76 | /// | ||
77 | /// ; Set to false for disk cache only. | ||
78 | /// MemoryCacheEnabled = true | ||
79 | /// | ||
80 | /// ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes | ||
81 | /// MemoryCacheTimeout = 2 | ||
82 | /// | ||
83 | /// ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes | ||
84 | /// ; Specify 0 if you do not want your disk cache to expire | ||
85 | /// FileCacheTimeout = 0 | ||
86 | /// | ||
87 | /// ; How often {in hours} should the disk be checked for expired filed | ||
88 | /// ; Specify 0 to disable expiration checking | ||
89 | /// FileCleanupTimer = .166 ;roughly every 10 minutes | ||
90 | /// | ||
91 | /// ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how | ||
92 | /// ; long (in miliseconds) to block a request thread while trying to complete | ||
93 | /// ; writing to disk. | ||
94 | /// WaitOnInprogressTimeout = 3000 | ||
95 | /// | ||
96 | /// ; Number of tiers to use for cache directories (current valid range 1 to 3) | ||
97 | /// CacheDirectoryTiers = 1 | ||
98 | /// | ||
99 | /// ; Number of letters per path tier, 1 will create 16 directories per tier, 2 - 256, 3 - 4096 and 4 - 65K | ||
100 | /// CacheDirectoryTierLength = 3 | ||
101 | /// | ||
102 | /// ; Warning level for cache directory size | ||
103 | /// CacheWarnAt = 30000 | ||
104 | /// ------- | ||
105 | /// </summary> | ||
106 | |||
107 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
108 | public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache | 57 | public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache |
109 | { | 58 | { |
@@ -361,7 +310,7 @@ namespace Flotsam.RegionModules.AssetCache | |||
361 | { | 310 | { |
362 | try | 311 | try |
363 | { | 312 | { |
364 | FileStream stream = File.Open(filename, FileMode.Open); | 313 | FileStream stream = File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read); |
365 | BinaryFormatter bformatter = new BinaryFormatter(); | 314 | BinaryFormatter bformatter = new BinaryFormatter(); |
366 | 315 | ||
367 | asset = (AssetBase)bformatter.Deserialize(stream); | 316 | asset = (AssetBase)bformatter.Deserialize(stream); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index 3ee6007..8cd1d55 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | |||
@@ -378,6 +378,12 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
378 | Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); | 378 | Assert.That(presence.HasAttachments(), Is.True, "Presence has not received new objects"); |
379 | } | 379 | } |
380 | 380 | ||
381 | [TearDown] | ||
382 | public void TearDown() | ||
383 | { | ||
384 | if (MainServer.Instance != null) MainServer.Instance.Stop(); | ||
385 | } | ||
386 | |||
381 | public static string GetRandomCapsObjectPath() | 387 | public static string GetRandomCapsObjectPath() |
382 | { | 388 | { |
383 | TestHelper.InMethod(); | 389 | TestHelper.InMethod(); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs index 23eab90..1d460dd 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/StandaloneTeleportTests.cs | |||
@@ -78,6 +78,17 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
78 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); | 78 | // Console.WriteLine("Beginning test {0}", MethodBase.GetCurrentMethod()); |
79 | } | 79 | } |
80 | 80 | ||
81 | [TearDown] | ||
82 | public void TearDown() | ||
83 | { | ||
84 | try | ||
85 | { | ||
86 | if (MainServer.Instance != null) MainServer.Instance.Stop(); | ||
87 | } | ||
88 | catch (NullReferenceException) | ||
89 | { } | ||
90 | } | ||
91 | |||
81 | } | 92 | } |
82 | 93 | ||
83 | public class ThreadRunResults | 94 | public class ThreadRunResults |
diff --git a/bin/config-include/FlotsamCache.ini.example b/bin/config-include/FlotsamCache.ini.example index feb3897..abb3b9a 100644 --- a/bin/config-include/FlotsamCache.ini.example +++ b/bin/config-include/FlotsamCache.ini.example | |||
@@ -23,6 +23,8 @@ | |||
23 | MemoryCacheEnabled = false | 23 | MemoryCacheEnabled = false |
24 | 24 | ||
25 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes | 25 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes |
26 | ; Optimization: for VPS or limited memory system installs set Timeout to .016 (1 minute) | ||
27 | ; increases performance without large memory impact | ||
26 | MemoryCacheTimeout = 2 | 28 | MemoryCacheTimeout = 2 |
27 | 29 | ||
28 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes | 30 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes |
diff --git a/prebuild.xml b/prebuild.xml index 4dbb81c..343b06a 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -3181,6 +3181,7 @@ | |||
3181 | <Reference name="OpenMetaverse.dll"/> | 3181 | <Reference name="OpenMetaverse.dll"/> |
3182 | <Reference name="OpenSim.Framework"/> | 3182 | <Reference name="OpenSim.Framework"/> |
3183 | <Reference name="OpenSim.Framework.Console"/> | 3183 | <Reference name="OpenSim.Framework.Console"/> |
3184 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | ||
3184 | <Reference name="Nini.dll" /> | 3185 | <Reference name="Nini.dll" /> |
3185 | <Reference name="log4net.dll"/> | 3186 | <Reference name="log4net.dll"/> |
3186 | 3187 | ||
@@ -3245,7 +3246,7 @@ | |||
3245 | <ReferencePath>../../../bin/</ReferencePath> | 3246 | <ReferencePath>../../../bin/</ReferencePath> |
3246 | <Reference name="System"/> | 3247 | <Reference name="System"/> |
3247 | <Reference name="System.Xml"/> | 3248 | <Reference name="System.Xml"/> |
3248 | <Reference name="System.Core"/> | 3249 | <Reference name="System.Core"/> |
3249 | <Reference name="System.Drawing"/> | 3250 | <Reference name="System.Drawing"/> |
3250 | <Reference name="System.Data"/> | 3251 | <Reference name="System.Data"/> |
3251 | <Reference name="OpenMetaverse.dll"/> | 3252 | <Reference name="OpenMetaverse.dll"/> |
@@ -3254,7 +3255,7 @@ | |||
3254 | <Reference name="OpenSim.Data"/> | 3255 | <Reference name="OpenSim.Data"/> |
3255 | <Reference name="OpenSim.Region.Framework"/> | 3256 | <Reference name="OpenSim.Region.Framework"/> |
3256 | <Reference name="OpenSim.Region.CoreModules"/> | 3257 | <Reference name="OpenSim.Region.CoreModules"/> |
3257 | <Reference name="OpenSim.Tests.Common"/> | 3258 | <Reference name="OpenSim.Tests.Common"/> |
3258 | <Reference name="log4net.dll"/> | 3259 | <Reference name="log4net.dll"/> |
3259 | <Reference name="Mono.Addins.dll" /> | 3260 | <Reference name="Mono.Addins.dll" /> |
3260 | <Reference name="nunit.framework.dll" /> | 3261 | <Reference name="nunit.framework.dll" /> |
@@ -3397,6 +3398,7 @@ | |||
3397 | <Reference name="XMLRPC.dll"/> | 3398 | <Reference name="XMLRPC.dll"/> |
3398 | <Reference name="OpenSim.Framework.Console"/> | 3399 | <Reference name="OpenSim.Framework.Console"/> |
3399 | <Reference name="OpenSim.Framework"/> | 3400 | <Reference name="OpenSim.Framework"/> |
3401 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | ||
3400 | <Reference name="OpenSim.Tests.Common"/> | 3402 | <Reference name="OpenSim.Tests.Common"/> |
3401 | <Reference name="Nini.dll" /> | 3403 | <Reference name="Nini.dll" /> |
3402 | <Reference name="nunit.framework.dll" /> | 3404 | <Reference name="nunit.framework.dll" /> |
@@ -3488,6 +3490,7 @@ | |||
3488 | <Reference name="OpenSim.Client.Linden"/> | 3490 | <Reference name="OpenSim.Client.Linden"/> |
3489 | <Reference name="OpenSim.Framework"/> | 3491 | <Reference name="OpenSim.Framework"/> |
3490 | <Reference name="OpenSim.Framework.Communications"/> | 3492 | <Reference name="OpenSim.Framework.Communications"/> |
3493 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | ||
3491 | <Reference name="OpenSim.Services.Interfaces"/> | 3494 | <Reference name="OpenSim.Services.Interfaces"/> |
3492 | <Reference name="OpenSim.Data"/> | 3495 | <Reference name="OpenSim.Data"/> |
3493 | <Reference name="OpenSim.Region.Framework"/> | 3496 | <Reference name="OpenSim.Region.Framework"/> |
@@ -3524,6 +3527,7 @@ | |||
3524 | <Reference name="OpenSim.Framework.Communications"/> | 3527 | <Reference name="OpenSim.Framework.Communications"/> |
3525 | <Reference name="OpenSim.Framework.Console"/> | 3528 | <Reference name="OpenSim.Framework.Console"/> |
3526 | <Reference name="OpenSim.Framework.Servers"/> | 3529 | <Reference name="OpenSim.Framework.Servers"/> |
3530 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | ||
3527 | <Reference name="OpenSim.Framework.Statistics"/> | 3531 | <Reference name="OpenSim.Framework.Statistics"/> |
3528 | <Reference name="OpenSim.Region.Communications.Local"/> | 3532 | <Reference name="OpenSim.Region.Communications.Local"/> |
3529 | <Reference name="OpenSim.Region.Framework"/> | 3533 | <Reference name="OpenSim.Region.Framework"/> |
@@ -3585,6 +3589,7 @@ | |||
3585 | <Reference name="OpenSim.Framework.Console"/> | 3589 | <Reference name="OpenSim.Framework.Console"/> |
3586 | <Reference name="OpenSim.Framework.Servers"/> | 3590 | <Reference name="OpenSim.Framework.Servers"/> |
3587 | <Reference name="OpenSim.Framework.Statistics"/> | 3591 | <Reference name="OpenSim.Framework.Statistics"/> |
3592 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | ||
3588 | <Reference name="OpenSim.Region.Communications.Local"/> | 3593 | <Reference name="OpenSim.Region.Communications.Local"/> |
3589 | <Reference name="OpenSim.Region.Framework"/> | 3594 | <Reference name="OpenSim.Region.Framework"/> |
3590 | <Reference name="OpenSim.Region.CoreModules"/> | 3595 | <Reference name="OpenSim.Region.CoreModules"/> |