diff options
author | John Hurliman | 2010-04-22 18:56:06 -0700 |
---|---|---|
committer | John Hurliman | 2010-04-22 18:56:06 -0700 |
commit | 8692ac53f56c8db9942021709e7415b2b2add0c6 (patch) | |
tree | 5681611d23f8f89b38d2c19ef032d412fd3fe3d2 /OpenSim/Region/CoreModules | |
parent | * Better error logging for failed SimianGrid web service calls (diff) | |
parent | Insert a ROLLBACK command on migration step failure. This ensures that (diff) | |
download | opensim-SC_OLD-8692ac53f56c8db9942021709e7415b2b2add0c6.zip opensim-SC_OLD-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.gz opensim-SC_OLD-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.bz2 opensim-SC_OLD-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
8 files changed, 114 insertions, 36 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 012d581..d30e954 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -181,7 +181,10 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
181 | Manager.MyScene.AssetService.Store(asset); | 181 | Manager.MyScene.AssetService.Store(asset); |
182 | 182 | ||
183 | if (part.Inventory.UpdateInventoryItem(item)) | 183 | if (part.Inventory.UpdateInventoryItem(item)) |
184 | { | ||
185 | remoteClient.SendAgentAlertMessage("Notecard saved", false); | ||
184 | part.GetProperties(remoteClient); | 186 | part.GetProperties(remoteClient); |
187 | } | ||
185 | } | 188 | } |
186 | } | 189 | } |
187 | } | 190 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 23828ef..f050dcf 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -30,6 +30,7 @@ using System.Reflection; | |||
30 | using log4net; | 30 | using log4net; |
31 | using Nini.Config; | 31 | using Nini.Config; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenMetaverse.Packets; | ||
33 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework; | 35 | using OpenSim.Region.Framework; |
35 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
@@ -169,6 +170,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
169 | return true; | 170 | return true; |
170 | } | 171 | } |
171 | 172 | ||
173 | public void RezMultipleAttachmentsFromInventory( | ||
174 | IClientAPI remoteClient, | ||
175 | RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | ||
176 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) | ||
177 | { | ||
178 | foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) | ||
179 | { | ||
180 | RezSingleAttachmentFromInventory(remoteClient, obj.ItemID, obj.AttachmentPt); | ||
181 | } | ||
182 | } | ||
183 | |||
172 | public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 184 | public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
173 | { | 185 | { |
174 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name); | 186 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name); |
@@ -227,6 +239,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
227 | // Fire after attach, so we don't get messy perms dialogs | 239 | // Fire after attach, so we don't get messy perms dialogs |
228 | // 3 == AttachedRez | 240 | // 3 == AttachedRez |
229 | objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 3); | 241 | objatt.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 3); |
242 | objatt.ResumeScripts(); | ||
230 | 243 | ||
231 | // Do this last so that event listeners have access to all the effects of the attachment | 244 | // Do this last so that event listeners have access to all the effects of the attachment |
232 | m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | 245 | m_scene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); |
@@ -311,6 +324,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
311 | } | 324 | } |
312 | } | 325 | } |
313 | 326 | ||
327 | public void DetachObject(uint objectLocalID, IClientAPI remoteClient) | ||
328 | { | ||
329 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | ||
330 | if (group != null) | ||
331 | { | ||
332 | //group.DetachToGround(); | ||
333 | ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); | ||
334 | } | ||
335 | } | ||
336 | |||
314 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) | 337 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) |
315 | { | 338 | { |
316 | ScenePresence presence; | 339 | ScenePresence presence; |
@@ -329,6 +352,38 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
329 | DetachSingleAttachmentToInv(itemID, remoteClient); | 352 | DetachSingleAttachmentToInv(itemID, remoteClient); |
330 | } | 353 | } |
331 | 354 | ||
355 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) | ||
356 | { | ||
357 | SceneObjectPart part = m_scene.GetSceneObjectPart(itemID); | ||
358 | if (part == null || part.ParentGroup == null) | ||
359 | return; | ||
360 | |||
361 | UUID inventoryID = part.ParentGroup.GetFromItemID(); | ||
362 | |||
363 | ScenePresence presence; | ||
364 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) | ||
365 | { | ||
366 | if (!m_scene.Permissions.CanRezObject( | ||
367 | part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition)) | ||
368 | return; | ||
369 | |||
370 | presence.Appearance.DetachAttachment(itemID); | ||
371 | |||
372 | if (m_scene.AvatarFactory != null) | ||
373 | { | ||
374 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | ||
375 | } | ||
376 | part.ParentGroup.DetachToGround(); | ||
377 | |||
378 | List<UUID> uuids = new List<UUID>(); | ||
379 | uuids.Add(inventoryID); | ||
380 | m_scene.InventoryService.DeleteItems(remoteClient.AgentId, uuids); | ||
381 | remoteClient.SendRemoveInventoryItem(inventoryID); | ||
382 | } | ||
383 | |||
384 | m_scene.EventManager.TriggerOnAttach(part.ParentGroup.LocalId, itemID, UUID.Zero); | ||
385 | } | ||
386 | |||
332 | // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. | 387 | // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. |
333 | // To LocalId or UUID, *THAT* is the question. How now Brown UUID?? | 388 | // To LocalId or UUID, *THAT* is the question. How now Brown UUID?? |
334 | protected void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) | 389 | protected void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) |
@@ -359,4 +414,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
359 | } | 414 | } |
360 | } | 415 | } |
361 | } | 416 | } |
362 | } \ No newline at end of file | 417 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 16e05b7..2352ced 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -601,6 +601,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
601 | 601 | ||
602 | // Fire on_rez | 602 | // Fire on_rez |
603 | group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 0); | 603 | group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 0); |
604 | rootPart.ParentGroup.ResumeScripts(); | ||
604 | 605 | ||
605 | rootPart.ScheduleFullUpdate(); | 606 | rootPart.ScheduleFullUpdate(); |
606 | } | 607 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index e97d21f..a2f26d5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -311,10 +311,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
311 | { | 311 | { |
312 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); | 312 | // m_log.DebugFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Requesting inventory item {0}", item.ID); |
313 | 313 | ||
314 | UUID requestedItemId = item.ID; | ||
315 | |||
314 | item = m_InventoryService.GetItem(item); | 316 | item = m_InventoryService.GetItem(item); |
315 | 317 | ||
316 | if (null == item) | 318 | if (null == item) |
317 | m_log.ErrorFormat("[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", item.ID); | 319 | m_log.ErrorFormat( |
320 | "[LOCAL INVENTORY SERVICES CONNECTOR]: Could not find item with id {0}", requestedItemId); | ||
318 | 321 | ||
319 | return item; | 322 | return item; |
320 | } | 323 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index b1b2336f8..c52f029 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -53,25 +53,27 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private static ASCIIEncoding m_asciiEncoding = new ASCIIEncoding(); | 56 | protected Scene m_scene; |
57 | private static UTF8Encoding m_utf8Encoding = new UTF8Encoding(); | 57 | protected Stream m_loadStream; |
58 | 58 | protected Guid m_requestId; | |
59 | private Scene m_scene; | 59 | protected string m_errorMessage; |
60 | private Stream m_loadStream; | ||
61 | private Guid m_requestId; | ||
62 | private string m_errorMessage; | ||
63 | 60 | ||
64 | /// <value> | 61 | /// <value> |
65 | /// Should the archive being loaded be merged with what is already on the region? | 62 | /// Should the archive being loaded be merged with what is already on the region? |
66 | /// </value> | 63 | /// </value> |
67 | private bool m_merge; | 64 | protected bool m_merge; |
65 | |||
66 | /// <value> | ||
67 | /// Should we ignore any assets when reloading the archive? | ||
68 | /// </value> | ||
69 | protected bool m_skipAssets; | ||
68 | 70 | ||
69 | /// <summary> | 71 | /// <summary> |
70 | /// Used to cache lookups for valid uuids. | 72 | /// Used to cache lookups for valid uuids. |
71 | /// </summary> | 73 | /// </summary> |
72 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); | 74 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); |
73 | 75 | ||
74 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId) | 76 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) |
75 | { | 77 | { |
76 | m_scene = scene; | 78 | m_scene = scene; |
77 | 79 | ||
@@ -89,14 +91,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
89 | 91 | ||
90 | m_errorMessage = String.Empty; | 92 | m_errorMessage = String.Empty; |
91 | m_merge = merge; | 93 | m_merge = merge; |
94 | m_skipAssets = skipAssets; | ||
92 | m_requestId = requestId; | 95 | m_requestId = requestId; |
93 | } | 96 | } |
94 | 97 | ||
95 | public ArchiveReadRequest(Scene scene, Stream loadStream, bool merge, Guid requestId) | 98 | public ArchiveReadRequest(Scene scene, Stream loadStream, bool merge, bool skipAssets, Guid requestId) |
96 | { | 99 | { |
97 | m_scene = scene; | 100 | m_scene = scene; |
98 | m_loadStream = loadStream; | 101 | m_loadStream = loadStream; |
99 | m_merge = merge; | 102 | m_merge = merge; |
103 | m_skipAssets = skipAssets; | ||
100 | m_requestId = requestId; | 104 | m_requestId = requestId; |
101 | } | 105 | } |
102 | 106 | ||
@@ -133,9 +137,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
133 | 137 | ||
134 | if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) | 138 | if (filePath.StartsWith(ArchiveConstants.OBJECTS_PATH)) |
135 | { | 139 | { |
136 | serialisedSceneObjects.Add(m_utf8Encoding.GetString(data)); | 140 | serialisedSceneObjects.Add(Encoding.UTF8.GetString(data)); |
137 | } | 141 | } |
138 | else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) | 142 | else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH) && !m_skipAssets) |
139 | { | 143 | { |
140 | if (LoadAsset(filePath, data)) | 144 | if (LoadAsset(filePath, data)) |
141 | successfulAssetRestores++; | 145 | successfulAssetRestores++; |
@@ -155,7 +159,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
155 | } | 159 | } |
156 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH)) | 160 | else if (!m_merge && filePath.StartsWith(ArchiveConstants.LANDDATA_PATH)) |
157 | { | 161 | { |
158 | serialisedParcels.Add(m_utf8Encoding.GetString(data)); | 162 | serialisedParcels.Add(Encoding.UTF8.GetString(data)); |
159 | } | 163 | } |
160 | else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) | 164 | else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) |
161 | { | 165 | { |
@@ -178,12 +182,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
178 | archive.Close(); | 182 | archive.Close(); |
179 | } | 183 | } |
180 | 184 | ||
181 | m_log.InfoFormat("[ARCHIVER]: Restored {0} assets", successfulAssetRestores); | 185 | if (!m_skipAssets) |
182 | |||
183 | if (failedAssetRestores > 0) | ||
184 | { | 186 | { |
185 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); | 187 | m_log.InfoFormat("[ARCHIVER]: Restored {0} assets", successfulAssetRestores); |
186 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); | 188 | |
189 | if (failedAssetRestores > 0) | ||
190 | { | ||
191 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); | ||
192 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); | ||
193 | } | ||
187 | } | 194 | } |
188 | 195 | ||
189 | if (!m_merge) | 196 | if (!m_merge) |
@@ -277,6 +284,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
277 | { | 284 | { |
278 | sceneObjectsLoadedCount++; | 285 | sceneObjectsLoadedCount++; |
279 | sceneObject.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, 0); | 286 | sceneObject.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, 0); |
287 | sceneObject.ResumeScripts(); | ||
280 | } | 288 | } |
281 | } | 289 | } |
282 | 290 | ||
@@ -541,7 +549,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
541 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); | 549 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); |
542 | 550 | ||
543 | XmlTextReader xtr | 551 | XmlTextReader xtr |
544 | = new XmlTextReader(m_asciiEncoding.GetString(data), XmlNodeType.Document, context); | 552 | = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); |
545 | 553 | ||
546 | RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings; | 554 | RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings; |
547 | 555 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index fc8d4e1..82ede01 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -94,8 +94,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | 94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) |
95 | { | 95 | { |
96 | bool mergeOar = false; | 96 | bool mergeOar = false; |
97 | bool skipAssets = false; | ||
97 | 98 | ||
98 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); | 99 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); |
100 | options.Add("s|skip-assets", delegate (string v) { skipAssets = v != null; }); | ||
101 | |||
99 | List<string> mainParams = options.Parse(cmdparams); | 102 | List<string> mainParams = options.Parse(cmdparams); |
100 | 103 | ||
101 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); | 104 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); |
@@ -105,11 +108,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
105 | 108 | ||
106 | if (mainParams.Count > 2) | 109 | if (mainParams.Count > 2) |
107 | { | 110 | { |
108 | DearchiveRegion(mainParams[2], mergeOar, Guid.Empty); | 111 | DearchiveRegion(mainParams[2], mergeOar, skipAssets, Guid.Empty); |
109 | } | 112 | } |
110 | else | 113 | else |
111 | { | 114 | { |
112 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); | 115 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, skipAssets, Guid.Empty); |
113 | } | 116 | } |
114 | } | 117 | } |
115 | 118 | ||
@@ -154,25 +157,25 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
154 | 157 | ||
155 | public void DearchiveRegion(string loadPath) | 158 | public void DearchiveRegion(string loadPath) |
156 | { | 159 | { |
157 | DearchiveRegion(loadPath, false, Guid.Empty); | 160 | DearchiveRegion(loadPath, false, false, Guid.Empty); |
158 | } | 161 | } |
159 | 162 | ||
160 | public void DearchiveRegion(string loadPath, bool merge, Guid requestId) | 163 | public void DearchiveRegion(string loadPath, bool merge, bool skipAssets, Guid requestId) |
161 | { | 164 | { |
162 | m_log.InfoFormat( | 165 | m_log.InfoFormat( |
163 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); | 166 | "[ARCHIVER]: Loading archive to region {0} from {1}", m_scene.RegionInfo.RegionName, loadPath); |
164 | 167 | ||
165 | new ArchiveReadRequest(m_scene, loadPath, merge, requestId).DearchiveRegion(); | 168 | new ArchiveReadRequest(m_scene, loadPath, merge, skipAssets, requestId).DearchiveRegion(); |
166 | } | 169 | } |
167 | 170 | ||
168 | public void DearchiveRegion(Stream loadStream) | 171 | public void DearchiveRegion(Stream loadStream) |
169 | { | 172 | { |
170 | DearchiveRegion(loadStream, false, Guid.Empty); | 173 | DearchiveRegion(loadStream, false, false, Guid.Empty); |
171 | } | 174 | } |
172 | 175 | ||
173 | public void DearchiveRegion(Stream loadStream, bool merge, Guid requestId) | 176 | public void DearchiveRegion(Stream loadStream, bool merge, bool skipAssets, Guid requestId) |
174 | { | 177 | { |
175 | new ArchiveReadRequest(m_scene, loadStream, merge, requestId).DearchiveRegion(); | 178 | new ArchiveReadRequest(m_scene, loadStream, merge, skipAssets, requestId).DearchiveRegion(); |
176 | } | 179 | } |
177 | } | 180 | } |
178 | } | 181 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index de16d89..624dc22 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -442,7 +442,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
442 | byte[] archive = archiveWriteStream.ToArray(); | 442 | byte[] archive = archiveWriteStream.ToArray(); |
443 | MemoryStream archiveReadStream = new MemoryStream(archive); | 443 | MemoryStream archiveReadStream = new MemoryStream(archive); |
444 | 444 | ||
445 | m_archiverModule.DearchiveRegion(archiveReadStream, true, Guid.Empty); | 445 | m_archiverModule.DearchiveRegion(archiveReadStream, true, false, Guid.Empty); |
446 | 446 | ||
447 | SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); | 447 | SceneObjectPart object1Existing = m_scene.GetSceneObjectPart(part1.Name); |
448 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); | 448 | Assert.That(object1Existing, Is.Not.Null, "object1 was not present after merge"); |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index d940564..01359f0 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1079,7 +1079,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1079 | 1079 | ||
1080 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) | 1080 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) |
1081 | return false; | 1081 | return false; |
1082 | } else { | 1082 | } |
1083 | else | ||
1084 | { | ||
1083 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1085 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1084 | return false; | 1086 | return false; |
1085 | } | 1087 | } |
@@ -1095,7 +1097,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1095 | return false; | 1097 | return false; |
1096 | 1098 | ||
1097 | if (!IsGroupMember(ti.GroupID, user, 0)) | 1099 | if (!IsGroupMember(ti.GroupID, user, 0)) |
1098 | return false; | 1100 | return false; |
1099 | } | 1101 | } |
1100 | 1102 | ||
1101 | // Require full perms | 1103 | // Require full perms |
@@ -1593,14 +1595,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1593 | if (part.OwnerID != user) | 1595 | if (part.OwnerID != user) |
1594 | { | 1596 | { |
1595 | if (part.GroupID == UUID.Zero) | 1597 | if (part.GroupID == UUID.Zero) |
1596 | return false; | 1598 | return false; |
1597 | 1599 | ||
1598 | if (!IsGroupMember(part.GroupID, user, 0)) | 1600 | if (!IsGroupMember(part.GroupID, user, 0)) |
1599 | return false; | 1601 | return false; |
1600 | 1602 | ||
1601 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) | 1603 | if ((part.GroupMask & (uint)PermissionMask.Modify) == 0) |
1602 | return false; | 1604 | return false; |
1603 | } else { | 1605 | } |
1606 | else | ||
1607 | { | ||
1604 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1608 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1605 | return false; | 1609 | return false; |
1606 | } | 1610 | } |
@@ -1855,7 +1859,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1855 | return GenericObjectPermission(agentID, prim, false); | 1859 | return GenericObjectPermission(agentID, prim, false); |
1856 | } | 1860 | } |
1857 | 1861 | ||
1858 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) { | 1862 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) |
1863 | { | ||
1859 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); | 1864 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); |
1860 | switch (scriptType) { | 1865 | switch (scriptType) { |
1861 | case 0: | 1866 | case 0: |
@@ -1889,4 +1894,4 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1889 | return(false); | 1894 | return(false); |
1890 | } | 1895 | } |
1891 | } | 1896 | } |
1892 | } | 1897 | } \ No newline at end of file |