aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2011-04-15 16:42:40 -0700
committerDiva Canto2011-04-15 16:42:40 -0700
commitcd6dce11086a4e8a06257659c19eaa66d3b1a951 (patch)
treeeb6e8b25f925e46cf41b5e9a386e40a3fa8ddfd2
parentMake remote admin error messages more helpful on windows. (diff)
downloadopensim-SC_OLD-cd6dce11086a4e8a06257659c19eaa66d3b1a951.zip
opensim-SC_OLD-cd6dce11086a4e8a06257659c19eaa66d3b1a951.tar.gz
opensim-SC_OLD-cd6dce11086a4e8a06257659c19eaa66d3b1a951.tar.bz2
opensim-SC_OLD-cd6dce11086a4e8a06257659c19eaa66d3b1a951.tar.xz
Fixes mantis #5431 -- coalesced objects in HG-enabled regions. Needs more testing to make sure HG inventory isn't broken by this (it shouldn't).
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs27
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs10
2 files changed, 12 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 4565d10..8c99983 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -129,35 +129,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
129 } 129 }
130 130
131 /// 131 ///
132 /// DeleteToInventory 132 /// Used in DeleteToInventory
133 /// 133 ///
134 public override UUID DeleteToInventory(DeRezAction action, UUID folderID, List<SceneObjectGroup> objectGroups, IClientAPI remoteClient) 134 protected override void ExportAsset(UUID agentID, UUID assetID)
135 { 135 {
136 UUID ret = UUID.Zero;
137
138 // HACK: Only works for lists of length one.
139 // Intermediate version, just to make things compile
140 foreach (SceneObjectGroup g in objectGroups)
141 ret = DeleteToInventory(action, folderID, g, remoteClient);
142
143 return ret;
144 }
145
146 // DO NOT OVERRIDE THE BASE METHOD
147 public new virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
148 SceneObjectGroup objectGroup, IClientAPI remoteClient)
149 {
150 UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);
151
152 if (!assetID.Equals(UUID.Zero)) 136 if (!assetID.Equals(UUID.Zero))
153 { 137 UploadInventoryItem(agentID, assetID, "", 0);
154 if (remoteClient != null)
155 UploadInventoryItem(remoteClient.AgentId, assetID, "", 0);
156 }
157 else 138 else
158 m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); 139 m_log.Debug("[HGScene]: Scene.Inventory did not create asset");
159
160 return assetID;
161 } 140 }
162 141
163 /// 142 ///
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 8b68dbe..a716326 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -330,11 +330,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
330 } 330 }
331 } 331 }
332 } 332 }
333
334 // This is a hook to do some per-asset post-processing for subclasses that need that
335 ExportAsset(remoteClient.AgentId, assetID);
333 } 336 }
334 337
335 return assetID; 338 return assetID;
336 } 339 }
337 340
341 protected virtual void ExportAsset(UUID agentID, UUID assetID)
342 {
343 // nothing to do here
344 }
345
338 /// <summary> 346 /// <summary>
339 /// Add relevant permissions for an object to the item. 347 /// Add relevant permissions for an object to the item.
340 /// </summary> 348 /// </summary>