diff options
author | Diva Canto | 2009-10-06 15:39:53 -0700 |
---|---|---|
committer | Diva Canto | 2009-10-06 15:39:53 -0700 |
commit | e992ca025571a891333a57012c2cd4419b6581e5 (patch) | |
tree | a6fd7e9f2e46999c72780bf60d2890e8a9c74fe4 /OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |
parent | * Change some more default ports to the robust default of 8003 (diff) | |
download | opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.zip opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.gz opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.bz2 opensim-SC-e992ca025571a891333a57012c2cd4419b6581e5.tar.xz |
Rewrote parts of the code that were double-locking different objects. This is about half of the code base reviewed.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 5b571c7..df9473d 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -122,12 +122,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
122 | public bool InventoryDeQueueAndDelete() | 122 | public bool InventoryDeQueueAndDelete() |
123 | { | 123 | { |
124 | DeleteToInventoryHolder x = null; | 124 | DeleteToInventoryHolder x = null; |
125 | int left = 0; | ||
125 | 126 | ||
126 | try | 127 | try |
127 | { | 128 | { |
128 | lock (m_inventoryDeletes) | 129 | lock (m_inventoryDeletes) |
129 | { | 130 | { |
130 | int left = m_inventoryDeletes.Count; | 131 | left = m_inventoryDeletes.Count; |
131 | if (left > 0) | 132 | if (left > 0) |
132 | { | 133 | { |
133 | x = m_inventoryDeletes.Dequeue(); | 134 | x = m_inventoryDeletes.Dequeue(); |
@@ -136,23 +137,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
136 | m_inventoryDeletes.Enqueue(x); | 137 | m_inventoryDeletes.Enqueue(x); |
137 | return true; | 138 | return true; |
138 | } | 139 | } |
140 | } | ||
141 | } | ||
139 | 142 | ||
140 | m_log.DebugFormat( | 143 | if (left > 0) |
141 | "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left); | 144 | { |
142 | 145 | m_log.DebugFormat( | |
143 | try | 146 | "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left); |
144 | { | 147 | |
145 | m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient); | 148 | try |
146 | if (x.permissionToDelete) | 149 | { |
147 | m_scene.DeleteSceneObject(x.objectGroup, false); | 150 | m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient); |
148 | } | 151 | if (x.permissionToDelete) |
149 | catch (Exception e) | 152 | m_scene.DeleteSceneObject(x.objectGroup, false); |
150 | { | 153 | } |
151 | m_log.DebugFormat("Exception background sending object: " + e); | 154 | catch (Exception e) |
152 | } | 155 | { |
153 | 156 | m_log.DebugFormat("Exception background sending object: " + e); | |
154 | return true; | ||
155 | } | 157 | } |
158 | |||
159 | return true; | ||
156 | } | 160 | } |
157 | } | 161 | } |
158 | catch (Exception e) | 162 | catch (Exception e) |