aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-11 20:33:29 +0000
committerJustin Clarke Casey2008-11-11 20:33:29 +0000
commita814ac3d671880474ca35dd1934e8ea7a9a6f81b (patch)
treebeb2f327055a6c16a10355b9cd97735b5e4366f8 /OpenSim/Region/Environment/Scenes
parentPrevent pieces from other people's HUDs from displaying at the center of (diff)
downloadopensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.zip
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.gz
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.bz2
opensim-SC_OLD-a814ac3d671880474ca35dd1934e8ea7a9a6f81b.tar.xz
* Put an Enabled switch on the async object deleter for future testing purposes
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs8
3 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
index ca28bbd..706ba6a 100644
--- a/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Environment/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -54,9 +54,14 @@ namespace OpenSim.Region.Environment.Scenes
54 private static readonly ILog m_log 54 private static readonly ILog m_log
55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
56 56
57 /// <value>
58 /// Is the deleter currently enabled?
59 /// </value>
60 public bool Enabled;
61
57 private Timer m_inventoryTicker = new Timer(2000); 62 private Timer m_inventoryTicker = new Timer(2000);
58 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>(); 63 private readonly Queue<DeleteToInventoryHolder> m_inventoryDeletes = new Queue<DeleteToInventoryHolder>();
59 private Scene m_scene; 64 private Scene m_scene;
60 65
61 public AsyncSceneObjectGroupDeleter(Scene scene) 66 public AsyncSceneObjectGroupDeleter(Scene scene)
62 { 67 {
@@ -73,7 +78,8 @@ namespace OpenSim.Region.Environment.Scenes
73 SceneObjectGroup objectGroup, IClientAPI remoteClient, 78 SceneObjectGroup objectGroup, IClientAPI remoteClient,
74 bool permissionToDelete) 79 bool permissionToDelete)
75 { 80 {
76 m_inventoryTicker.Stop(); 81 if (Enabled)
82 m_inventoryTicker.Stop();
77 83
78 lock (m_inventoryDeletes) 84 lock (m_inventoryDeletes)
79 { 85 {
@@ -87,7 +93,8 @@ namespace OpenSim.Region.Environment.Scenes
87 m_inventoryDeletes.Enqueue(dtis); 93 m_inventoryDeletes.Enqueue(dtis);
88 } 94 }
89 95
90 m_inventoryTicker.Start(); 96 if (Enabled)
97 m_inventoryTicker.Start();
91 98
92 // Visually remove it, even if it isnt really gone yet. 99 // Visually remove it, even if it isnt really gone yet.
93 if (permissionToDelete) 100 if (permissionToDelete)
@@ -132,6 +139,7 @@ namespace OpenSim.Region.Environment.Scenes
132 m_log.DebugFormat("Exception background deleting object: "+e.ToString()); 139 m_log.DebugFormat("Exception background deleting object: "+e.ToString());
133 } 140 }
134 } 141 }
142
135 return true; 143 return true;
136 } 144 }
137 } 145 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index fd4eb58..326380b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -281,7 +281,9 @@ namespace OpenSim.Region.Environment.Scenes
281 281
282 m_eventManager = new EventManager(); 282 m_eventManager = new EventManager();
283 m_externalChecks = new SceneExternalChecks(this); 283 m_externalChecks = new SceneExternalChecks(this);
284
284 m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); 285 m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this);
286 m_asyncSceneObjectDeleter.Enabled = true;
285 287
286 // Load region settings 288 // Load region settings
287 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 289 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
index 35b633e..b603e30 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTests.cs
@@ -106,5 +106,13 @@ namespace OpenSim.Region.Environment.Scenes.Tests
106 // If the parts have the same UUID then we will consider them as one and the same 106 // If the parts have the same UUID then we will consider them as one and the same
107 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID)); 107 Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
108 } 108 }
109
110 /*
111 public void TestRemoveSceneObject()
112 {
113 Scene scene = SetupScene();
114 SceneObjectPart part = AddSceneObject(scene);
115 }
116 */
109 } 117 }
110} \ No newline at end of file 118} \ No newline at end of file