diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
7 files changed, 179 insertions, 107 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 117b2fd..3238a81 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
56 | /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version | 56 | /// The maximum major version of OAR that we can read. Minor versions shouldn't need a max number since version |
57 | /// bumps here should be compatible. | 57 | /// bumps here should be compatible. |
58 | /// </summary> | 58 | /// </summary> |
59 | public static int MAX_MAJOR_VERSION = 0; | 59 | public static int MAX_MAJOR_VERSION = 1; |
60 | 60 | ||
61 | protected Scene m_scene; | 61 | protected Scene m_scene; |
62 | protected Stream m_loadStream; | 62 | protected Stream m_loadStream; |
@@ -78,6 +78,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
78 | /// </summary> | 78 | /// </summary> |
79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); | 79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); |
80 | 80 | ||
81 | private IUserManagement m_UserMan; | ||
82 | private IUserManagement UserManager | ||
83 | { | ||
84 | get | ||
85 | { | ||
86 | if (m_UserMan == null) | ||
87 | { | ||
88 | m_UserMan = m_scene.RequestModuleInterface<IUserManagement>(); | ||
89 | } | ||
90 | return m_UserMan; | ||
91 | } | ||
92 | } | ||
93 | |||
81 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) | 94 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) |
82 | { | 95 | { |
83 | m_scene = scene; | 96 | m_scene = scene; |
@@ -251,8 +264,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
251 | 264 | ||
252 | foreach (SceneObjectPart part in sceneObject.Parts) | 265 | foreach (SceneObjectPart part in sceneObject.Parts) |
253 | { | 266 | { |
254 | if (!ResolveUserUuid(part.CreatorID)) | 267 | if (part.CreatorData == null || part.CreatorData == string.Empty) |
255 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 268 | { |
269 | if (!ResolveUserUuid(part.CreatorID)) | ||
270 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
271 | } | ||
272 | if (UserManager != null) | ||
273 | UserManager.AddUser(part.CreatorID, part.CreatorData); | ||
256 | 274 | ||
257 | if (!ResolveUserUuid(part.OwnerID)) | 275 | if (!ResolveUserUuid(part.OwnerID)) |
258 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 276 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
@@ -276,10 +294,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
276 | { | 294 | { |
277 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 295 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
278 | } | 296 | } |
279 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | 297 | if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty) |
280 | { | 298 | { |
281 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 299 | if (!ResolveUserUuid(kvp.Value.CreatorID)) |
300 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
282 | } | 301 | } |
302 | if (UserManager != null) | ||
303 | UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData); | ||
283 | } | 304 | } |
284 | } | 305 | } |
285 | } | 306 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 0567a82..b987b5a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -49,7 +49,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
49 | public class ArchiveWriteRequestPreparation | 49 | public class ArchiveWriteRequestPreparation |
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | /// <summary> | ||
54 | /// The minimum major version of OAR that we can write. | ||
55 | /// </summary> | ||
56 | public static int MIN_MAJOR_VERSION = 0; | ||
57 | |||
58 | /// <summary> | ||
59 | /// The maximum major version of OAR that we can write. | ||
60 | /// </summary> | ||
61 | public static int MAX_MAJOR_VERSION = 1; | ||
62 | |||
53 | protected Scene m_scene; | 63 | protected Scene m_scene; |
54 | protected Stream m_saveStream; | 64 | protected Stream m_saveStream; |
55 | protected Guid m_requestId; | 65 | protected Guid m_requestId; |
@@ -101,110 +111,137 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
101 | /// <exception cref="System.IO.IOException">if there was an io problem with creating the file</exception> | 111 | /// <exception cref="System.IO.IOException">if there was an io problem with creating the file</exception> |
102 | public void ArchiveRegion(Dictionary<string, object> options) | 112 | public void ArchiveRegion(Dictionary<string, object> options) |
103 | { | 113 | { |
104 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); | 114 | try |
105 | 115 | { | |
106 | EntityBase[] entities = m_scene.GetEntities(); | 116 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); |
107 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 117 | |
108 | 118 | EntityBase[] entities = m_scene.GetEntities(); | |
109 | /* | 119 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
110 | foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) | 120 | |
121 | /* | ||
122 | foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) | ||
123 | { | ||
124 | if (name == lo.LandData.Name) | ||
125 | { | ||
126 | // This is the parcel we want | ||
127 | } | ||
128 | } | ||
129 | */ | ||
130 | |||
131 | // Filter entities so that we only have scene objects. | ||
132 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods | ||
133 | // end up having to do this | ||
134 | foreach (EntityBase entity in entities) | ||
111 | { | 135 | { |
112 | if (name == lo.LandData.Name) | 136 | if (entity is SceneObjectGroup) |
113 | { | 137 | { |
114 | // This is the parcel we want | 138 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; |
139 | |||
140 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) | ||
141 | sceneObjects.Add((SceneObjectGroup)entity); | ||
115 | } | 142 | } |
116 | } | 143 | } |
117 | */ | 144 | |
118 | 145 | UuidGatherer assetGatherer = new UuidGatherer(m_scene.AssetService); | |
119 | // Filter entities so that we only have scene objects. | 146 | |
120 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods | 147 | foreach (SceneObjectGroup sceneObject in sceneObjects) |
121 | // end up having to do this | ||
122 | foreach (EntityBase entity in entities) | ||
123 | { | ||
124 | if (entity is SceneObjectGroup) | ||
125 | { | 148 | { |
126 | SceneObjectGroup sceneObject = (SceneObjectGroup)entity; | 149 | assetGatherer.GatherAssetUuids(sceneObject, assetUuids); |
127 | |||
128 | if (!sceneObject.IsDeleted && !sceneObject.IsAttachment) | ||
129 | sceneObjects.Add((SceneObjectGroup)entity); | ||
130 | } | 150 | } |
151 | |||
152 | m_log.DebugFormat( | ||
153 | "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", | ||
154 | sceneObjects.Count, assetUuids.Count); | ||
155 | |||
156 | // Make sure that we also request terrain texture assets | ||
157 | RegionSettings regionSettings = m_scene.RegionInfo.RegionSettings; | ||
158 | |||
159 | if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) | ||
160 | assetUuids[regionSettings.TerrainTexture1] = AssetType.Texture; | ||
161 | |||
162 | if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) | ||
163 | assetUuids[regionSettings.TerrainTexture2] = AssetType.Texture; | ||
164 | |||
165 | if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) | ||
166 | assetUuids[regionSettings.TerrainTexture3] = AssetType.Texture; | ||
167 | |||
168 | if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) | ||
169 | assetUuids[regionSettings.TerrainTexture4] = AssetType.Texture; | ||
170 | |||
171 | TarArchiveWriter archiveWriter = new TarArchiveWriter(m_saveStream); | ||
172 | |||
173 | // Asynchronously request all the assets required to perform this archive operation | ||
174 | ArchiveWriteRequestExecution awre | ||
175 | = new ArchiveWriteRequestExecution( | ||
176 | sceneObjects, | ||
177 | m_scene.RequestModuleInterface<ITerrainModule>(), | ||
178 | m_scene.RequestModuleInterface<IRegionSerialiserModule>(), | ||
179 | m_scene, | ||
180 | archiveWriter, | ||
181 | m_requestId, | ||
182 | options); | ||
183 | |||
184 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); | ||
185 | |||
186 | // Write out control file. This has to be done first so that subsequent loaders will see this file first | ||
187 | // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this | ||
188 | archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile(options)); | ||
189 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
190 | |||
191 | new AssetsRequest( | ||
192 | new AssetsArchiver(archiveWriter), assetUuids, | ||
193 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); | ||
131 | } | 194 | } |
132 | 195 | catch (Exception) | |
133 | UuidGatherer assetGatherer = new UuidGatherer(m_scene.AssetService); | ||
134 | |||
135 | foreach (SceneObjectGroup sceneObject in sceneObjects) | ||
136 | { | 196 | { |
137 | assetGatherer.GatherAssetUuids(sceneObject, assetUuids); | 197 | m_saveStream.Close(); |
138 | } | 198 | throw; |
139 | 199 | } | |
140 | m_log.DebugFormat( | ||
141 | "[ARCHIVER]: {0} scene objects to serialize requiring save of {1} assets", | ||
142 | sceneObjects.Count, assetUuids.Count); | ||
143 | |||
144 | // Make sure that we also request terrain texture assets | ||
145 | RegionSettings regionSettings = m_scene.RegionInfo.RegionSettings; | ||
146 | |||
147 | if (regionSettings.TerrainTexture1 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_1) | ||
148 | assetUuids[regionSettings.TerrainTexture1] = AssetType.Texture; | ||
149 | |||
150 | if (regionSettings.TerrainTexture2 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_2) | ||
151 | assetUuids[regionSettings.TerrainTexture2] = AssetType.Texture; | ||
152 | |||
153 | if (regionSettings.TerrainTexture3 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_3) | ||
154 | assetUuids[regionSettings.TerrainTexture3] = AssetType.Texture; | ||
155 | |||
156 | if (regionSettings.TerrainTexture4 != RegionSettings.DEFAULT_TERRAIN_TEXTURE_4) | ||
157 | assetUuids[regionSettings.TerrainTexture4] = AssetType.Texture; | ||
158 | |||
159 | TarArchiveWriter archiveWriter = new TarArchiveWriter(m_saveStream); | ||
160 | |||
161 | // Asynchronously request all the assets required to perform this archive operation | ||
162 | ArchiveWriteRequestExecution awre | ||
163 | = new ArchiveWriteRequestExecution( | ||
164 | sceneObjects, | ||
165 | m_scene.RequestModuleInterface<ITerrainModule>(), | ||
166 | m_scene.RequestModuleInterface<IRegionSerialiserModule>(), | ||
167 | m_scene, | ||
168 | archiveWriter, | ||
169 | m_requestId, | ||
170 | options); | ||
171 | |||
172 | m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); | ||
173 | |||
174 | // Write out control file. This has to be done first so that subsequent loaders will see this file first | ||
175 | // XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this | ||
176 | archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile(options)); | ||
177 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
178 | |||
179 | new AssetsRequest( | ||
180 | new AssetsArchiver(archiveWriter), assetUuids, | ||
181 | m_scene.AssetService, awre.ReceivedAllAssets).Execute(); | ||
182 | } | 200 | } |
183 | 201 | ||
184 | /// <summary> | 202 | /// <summary> |
185 | /// Create the control file for the most up to date archive | 203 | /// Create the control file for the most up to date archive |
186 | /// </summary> | 204 | /// </summary> |
187 | /// <returns></returns> | 205 | /// <returns></returns> |
188 | public static string Create0p2ControlFile(Dictionary<string, object> options) | 206 | public static string CreateControlFile(Dictionary<string, object> options) |
189 | { | 207 | { |
190 | int majorVersion = 0, minorVersion = 5; | 208 | int majorVersion = MAX_MAJOR_VERSION, minorVersion = 0; |
191 | 209 | ||
192 | if (options.ContainsKey("version")) | 210 | if (options.ContainsKey("version")) |
193 | { | 211 | { |
194 | minorVersion = 0; | ||
195 | string[] parts = options["version"].ToString().Split('.'); | 212 | string[] parts = options["version"].ToString().Split('.'); |
196 | if (parts.Length >= 1) | 213 | if (parts.Length >= 1) |
197 | majorVersion = Int32.Parse(parts[0]); | 214 | { |
198 | if (parts.Length >= 2) | 215 | majorVersion = Int32.Parse(parts[0]); |
199 | minorVersion = Int32.Parse(parts[1]); | 216 | |
217 | if (parts.Length >= 2) | ||
218 | minorVersion = Int32.Parse(parts[1]); | ||
219 | } | ||
200 | } | 220 | } |
201 | 221 | ||
202 | m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); | 222 | if (majorVersion < MIN_MAJOR_VERSION || majorVersion > MAX_MAJOR_VERSION) |
203 | // if (majorVersion == 1) | 223 | { |
204 | // { | 224 | throw new Exception( |
205 | // m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); | 225 | string.Format( |
206 | // } | 226 | "OAR version number for save must be between {0} and {1}", |
227 | MIN_MAJOR_VERSION, MAX_MAJOR_VERSION)); | ||
228 | } | ||
229 | else if (majorVersion == MAX_MAJOR_VERSION) | ||
230 | { | ||
231 | // Force 1.0 | ||
232 | minorVersion = 0; | ||
233 | } | ||
234 | else if (majorVersion == MIN_MAJOR_VERSION) | ||
235 | { | ||
236 | // Force 0.4 | ||
237 | minorVersion = 4; | ||
238 | } | ||
207 | 239 | ||
240 | m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); | ||
241 | if (majorVersion == 1) | ||
242 | { | ||
243 | m_log.WarnFormat("[ARCHIVER]: Please be aware that version 1.0 OARs are not compatible with OpenSim 0.7.0.2 and earlier. Please use the --version=0 option if you want to produce a compatible OAR"); | ||
244 | } | ||
208 | 245 | ||
209 | StringWriter sw = new StringWriter(); | 246 | StringWriter sw = new StringWriter(); |
210 | XmlTextWriter xtw = new XmlTextWriter(sw); | 247 | XmlTextWriter xtw = new XmlTextWriter(sw); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index e0ad71e..358d0a7 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -126,6 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
126 | 126 | ||
127 | OptionSet ops = new OptionSet(); | 127 | OptionSet ops = new OptionSet(); |
128 | ops.Add("v|version=", delegate(string v) { options["version"] = v; }); | 128 | ops.Add("v|version=", delegate(string v) { options["version"] = v; }); |
129 | ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); | ||
129 | 130 | ||
130 | List<string> mainParams = ops.Parse(cmdparams); | 131 | List<string> mainParams = ops.Parse(cmdparams); |
131 | 132 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 04bdc4f..04b6e3d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -122,13 +122,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
122 | } | 122 | } |
123 | 123 | ||
124 | /// <summary> | 124 | /// <summary> |
125 | /// Test saving a V0.2 OpenSim Region Archive. | 125 | /// Test saving an OpenSim Region Archive. |
126 | /// </summary> | 126 | /// </summary> |
127 | [Test] | 127 | [Test] |
128 | public void TestSaveOarV0_2() | 128 | public void TestSaveOar() |
129 | { | 129 | { |
130 | TestHelper.InMethod(); | 130 | TestHelper.InMethod(); |
131 | //log4net.Config.XmlConfigurator.Configure(); | 131 | // log4net.Config.XmlConfigurator.Configure(); |
132 | 132 | ||
133 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 133 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
134 | SceneObjectGroup sog1 = new SceneObjectGroup(part1); | 134 | SceneObjectGroup sog1 = new SceneObjectGroup(part1); |
@@ -212,10 +212,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
212 | } | 212 | } |
213 | 213 | ||
214 | /// <summary> | 214 | /// <summary> |
215 | /// Test loading a V0.2 OpenSim Region Archive. | 215 | /// Test loading an OpenSim Region Archive. |
216 | /// </summary> | 216 | /// </summary> |
217 | [Test] | 217 | [Test] |
218 | public void TestLoadOarV0_2() | 218 | public void TestLoadOar() |
219 | { | 219 | { |
220 | TestHelper.InMethod(); | 220 | TestHelper.InMethod(); |
221 | // log4net.Config.XmlConfigurator.Configure(); | 221 | // log4net.Config.XmlConfigurator.Configure(); |
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
230 | // upset load | 230 | // upset load |
231 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); | 231 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); |
232 | 232 | ||
233 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary<string, Object>())); | 233 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.CreateControlFile(new Dictionary<string, Object>())); |
234 | 234 | ||
235 | SceneObjectPart part1 = CreateSceneObjectPart1(); | 235 | SceneObjectPart part1 = CreateSceneObjectPart1(); |
236 | SceneObjectGroup object1 = new SceneObjectGroup(part1); | 236 | SceneObjectGroup object1 = new SceneObjectGroup(part1); |
@@ -317,10 +317,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
317 | } | 317 | } |
318 | 318 | ||
319 | /// <summary> | 319 | /// <summary> |
320 | /// Test loading the region settings of a V0.2 OpenSim Region Archive. | 320 | /// Test loading the region settings of an OpenSim Region Archive. |
321 | /// </summary> | 321 | /// </summary> |
322 | [Test] | 322 | [Test] |
323 | public void TestLoadOarV0_2RegionSettings() | 323 | public void TestLoadOarRegionSettings() |
324 | { | 324 | { |
325 | TestHelper.InMethod(); | 325 | TestHelper.InMethod(); |
326 | //log4net.Config.XmlConfigurator.Configure(); | 326 | //log4net.Config.XmlConfigurator.Configure(); |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
329 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); | 329 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
330 | 330 | ||
331 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); | 331 | tar.WriteDir(ArchiveConstants.TERRAINS_PATH); |
332 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.Create0p2ControlFile(new Dictionary<string, Object>())); | 332 | tar.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, ArchiveWriteRequestPreparation.CreateControlFile(new Dictionary<string, Object>())); |
333 | 333 | ||
334 | RegionSettings rs = new RegionSettings(); | 334 | RegionSettings rs = new RegionSettings(); |
335 | rs.AgentLimit = 17; | 335 | rs.AgentLimit = 17; |
@@ -409,10 +409,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
409 | } | 409 | } |
410 | 410 | ||
411 | /// <summary> | 411 | /// <summary> |
412 | /// Test merging a V0.2 OpenSim Region Archive into an existing scene | 412 | /// Test merging an OpenSim Region Archive into an existing scene |
413 | /// </summary> | 413 | /// </summary> |
414 | //[Test] | 414 | //[Test] |
415 | public void TestMergeOarV0_2() | 415 | public void TestMergeOar() |
416 | { | 416 | { |
417 | TestHelper.InMethod(); | 417 | TestHelper.InMethod(); |
418 | //XmlConfigurator.Configure(); | 418 | //XmlConfigurator.Configure(); |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 6844c60..622fc08 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -771,8 +771,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
771 | for (int i = 0; i < uuidarr.Length; i++) | 771 | for (int i = 0; i < uuidarr.Length; i++) |
772 | { | 772 | { |
773 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); | 773 | // string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]); |
774 | m_scene.GetUserName(uuidarr[i]); | 774 | |
775 | IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>(); | ||
776 | string userName = "Unkown User"; | ||
777 | if (userManager != null) | ||
778 | userName = userManager.GetUserName(uuidarr[i]); | ||
779 | |||
775 | // we drop it. It gets cached though... so we're ready for the next request. | 780 | // we drop it. It gets cached though... so we're ready for the next request. |
781 | // diva commnent 11/21/2010: uh?!? wft? | ||
776 | } | 782 | } |
777 | } | 783 | } |
778 | #endregion | 784 | #endregion |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index c06ccb2..568ba19 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -189,6 +189,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
189 | 189 | ||
190 | InventoryItemBase item = new InventoryItemBase(); | 190 | InventoryItemBase item = new InventoryItemBase(); |
191 | item.CreatorId = part.CreatorID.ToString(); | 191 | item.CreatorId = part.CreatorID.ToString(); |
192 | item.CreatorData = part.CreatorData; | ||
192 | 193 | ||
193 | item.ID = UUID.Random(); | 194 | item.ID = UUID.Random(); |
194 | item.Owner = remoteClient.AgentId; | 195 | item.Owner = remoteClient.AgentId; |
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index abd28c8..8df44fe 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -106,14 +106,20 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
106 | { | 106 | { |
107 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); | 107 | SceneObjectPart part = m_scene.GetSceneObjectPart(objectID); |
108 | if (part == null) | 108 | if (part == null) |
109 | return; | ||
110 | |||
111 | SceneObjectGroup grp = part.ParentGroup; | ||
112 | |||
113 | if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) | ||
114 | { | 109 | { |
115 | objectID = ownerID; | 110 | ScenePresence sp; |
116 | parentID = ownerID; | 111 | if (!m_scene.TryGetScenePresence(objectID, out sp)) |
112 | return; | ||
113 | } | ||
114 | else | ||
115 | { | ||
116 | SceneObjectGroup grp = part.ParentGroup; | ||
117 | |||
118 | if (grp.IsAttachment && grp.GetAttachmentPoint() > 30) | ||
119 | { | ||
120 | objectID = ownerID; | ||
121 | parentID = ownerID; | ||
122 | } | ||
117 | } | 123 | } |
118 | 124 | ||
119 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) | 125 | m_scene.ForEachScenePresence(delegate(ScenePresence sp) |