diff options
author | John Hurliman | 2010-09-12 14:21:51 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-12 14:21:51 -0700 |
commit | c03b24cbfdc449cf326cf0f560395753339169dc (patch) | |
tree | d62a666839d3c638b5c9799c70be971a2d6d6c18 /OpenSim/Region/CoreModules | |
parent | * Added ISimulationDataService and IEstateDataService (diff) | |
parent | Formatting cleanup. (diff) | |
download | opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.zip opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.gz opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.bz2 opensim-SC_OLD-c03b24cbfdc449cf326cf0f560395753339169dc.tar.xz |
Merged
Diffstat (limited to 'OpenSim/Region/CoreModules')
26 files changed, 232 insertions, 237 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 7270304..5604f49 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -48,8 +48,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
48 | 48 | ||
49 | protected Scene m_scene = null; | 49 | protected Scene m_scene = null; |
50 | 50 | ||
51 | public string Name { get { return "Attachments Module"; } } | 51 | public string Name { get { return "Attachments Module"; } } |
52 | public Type ReplaceableInterface { get { return null; } } | 52 | public Type ReplaceableInterface { get { return null; } } |
53 | 53 | ||
54 | public void Initialise(IConfigSource source) {} | 54 | public void Initialise(IConfigSource source) {} |
55 | 55 | ||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; | 80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; |
81 | client.OnObjectAttach += AttachObject; | 81 | client.OnObjectAttach += AttachObject; |
82 | client.OnObjectDetach += DetachObject; | 82 | client.OnObjectDetach += DetachObject; |
83 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; | 83 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; |
84 | } | 84 | } |
85 | 85 | ||
86 | public void UnsubscribeFromClientEvents(IClientAPI client) | 86 | public void UnsubscribeFromClientEvents(IClientAPI client) |
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; | 89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; |
90 | client.OnObjectAttach -= AttachObject; | 90 | client.OnObjectAttach -= AttachObject; |
91 | client.OnObjectDetach -= DetachObject; | 91 | client.OnObjectDetach -= DetachObject; |
92 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; | 92 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; |
93 | } | 93 | } |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
@@ -173,12 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
173 | UUID itemID = UUID.Zero; | 173 | UUID itemID = UUID.Zero; |
174 | if (sp != null) | 174 | if (sp != null) |
175 | { | 175 | { |
176 | foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) | 176 | foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) |
177 | { | 177 | { |
178 | itemID = grp.GetFromItemID(); | 178 | itemID = grp.GetFromItemID(); |
179 | if (itemID != UUID.Zero) | 179 | if (itemID != UUID.Zero) |
180 | DetachSingleAttachmentToInv(itemID, remoteClient); | 180 | DetachSingleAttachmentToInv(itemID, remoteClient); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
184 | if (group.GetFromItemID() == UUID.Zero) | 184 | if (group.GetFromItemID() == UUID.Zero) |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
225 | 225 | ||
226 | public UUID RezSingleAttachmentFromInventory( | 226 | public UUID RezSingleAttachmentFromInventory( |
227 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) | 227 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) |
228 | { | 228 | { |
229 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); | 229 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); |
230 | 230 | ||
231 | if (updateInventoryStatus) | 231 | if (updateInventoryStatus) |
@@ -241,8 +241,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
241 | if (null == att) | 241 | if (null == att) |
242 | return UUID.Zero; | 242 | return UUID.Zero; |
243 | else | 243 | else |
244 | return att.UUID; | 244 | return att.UUID; |
245 | } | 245 | } |
246 | 246 | ||
247 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( | 247 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( |
248 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 248 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
@@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
298 | } | 298 | } |
299 | 299 | ||
300 | return null; | 300 | return null; |
301 | } | 301 | } |
302 | 302 | ||
303 | public UUID SetAttachmentInventoryStatus( | 303 | public UUID SetAttachmentInventoryStatus( |
304 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 304 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
@@ -473,7 +473,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
473 | sog.RootPart.IsAttachment = false; | 473 | sog.RootPart.IsAttachment = false; |
474 | sog.AbsolutePosition = sog.RootPart.AttachedPos; | 474 | sog.AbsolutePosition = sog.RootPart.AttachedPos; |
475 | UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); | 475 | UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); |
476 | sog.SetAttachmentPoint(attachmentPoint); | 476 | sog.SetAttachmentPoint(attachmentPoint); |
477 | } | 477 | } |
478 | 478 | ||
479 | /// <summary> | 479 | /// <summary> |
@@ -600,7 +600,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
600 | // In case it is later dropped again, don't let | 600 | // In case it is later dropped again, don't let |
601 | // it get cleaned up | 601 | // it get cleaned up |
602 | so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); | 602 | so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); |
603 | so.HasGroupChanged = false; | 603 | so.HasGroupChanged = false; |
604 | } | 604 | } |
605 | } | 605 | } |
606 | } | 606 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 032e55a..25322a1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
132 | try | 132 | try |
133 | { | 133 | { |
134 | deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); | 134 | deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); |
135 | if(killingAvatar != null) | 135 | if (killingAvatar != null) |
136 | killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); | 136 | killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); |
137 | } | 137 | } |
138 | catch (InvalidOperationException) | 138 | catch (InvalidOperationException) |
@@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
143 | } | 143 | } |
144 | 144 | ||
145 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | 145 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
146 | { | 146 | { |
147 | try | 147 | try |
148 | { | 148 | { |
149 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 149 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 4b30b0d..5ec64d5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -58,13 +58,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
58 | public void SubscribeToClientEvents(IClientAPI client) | 58 | public void SubscribeToClientEvents(IClientAPI client) |
59 | { | 59 | { |
60 | client.OnGodKickUser += KickUser; | 60 | client.OnGodKickUser += KickUser; |
61 | client.OnRequestGodlikePowers += RequestGodlikePowers; | 61 | client.OnRequestGodlikePowers += RequestGodlikePowers; |
62 | } | 62 | } |
63 | 63 | ||
64 | public void UnsubscribeFromClientEvents(IClientAPI client) | 64 | public void UnsubscribeFromClientEvents(IClientAPI client) |
65 | { | 65 | { |
66 | client.OnGodKickUser -= KickUser; | 66 | client.OnGodKickUser -= KickUser; |
67 | client.OnRequestGodlikePowers -= RequestGodlikePowers; | 67 | client.OnRequestGodlikePowers -= RequestGodlikePowers; |
68 | } | 68 | } |
69 | 69 | ||
70 | public void RequestGodlikePowers( | 70 | public void RequestGodlikePowers( |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 13bae2e..43bbf0d 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
137 | { | 137 | { |
138 | if (scene.Entities.ContainsKey(toAgentID) && | 138 | if (scene.Entities.ContainsKey(toAgentID) && |
139 | scene.Entities[toAgentID] is ScenePresence) | 139 | scene.Entities[toAgentID] is ScenePresence) |
140 | { | 140 | { |
141 | // m_log.DebugFormat( | 141 | // m_log.DebugFormat( |
142 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", | 142 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
143 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | 143 | // toAgentID.ToString(), scene.RegionInfo.RegionName); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 52342ec..c1df827 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -179,14 +179,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
179 | m_log.DebugFormat( | 179 | m_log.DebugFormat( |
180 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", | 180 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", |
181 | successfulAssetRestores, failedAssetRestores); | 181 | successfulAssetRestores, failedAssetRestores); |
182 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); | 182 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); |
183 | 183 | ||
184 | return loadedNodes; | 184 | return loadedNodes; |
185 | } | 185 | } |
186 | finally | 186 | finally |
187 | { | 187 | { |
188 | m_loadStream.Close(); | 188 | m_loadStream.Close(); |
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | public void Close() | 192 | public void Close() |
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
201 | /// <param name="iarPath">The item archive path to replicate</param> | 201 | /// <param name="iarPath">The item archive path to replicate</param> |
202 | /// <param name="rootDestinationFolder">The root folder for the inventory load</param> | 202 | /// <param name="rootDestinationFolder">The root folder for the inventory load</param> |
203 | /// <param name="resolvedFolders"> | 203 | /// <param name="resolvedFolders"> |
204 | /// The folders that we have resolved so far for a given archive path. | 204 | /// The folders that we have resolved so far for a given archive path. |
205 | /// This method will add more folders if necessary | 205 | /// This method will add more folders if necessary |
206 | /// </param> | 206 | /// </param> |
207 | /// <param name="loadedNodes"> | 207 | /// <param name="loadedNodes"> |
@@ -246,17 +246,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
246 | /// The root folder for the inventory load | 246 | /// The root folder for the inventory load |
247 | /// </param> | 247 | /// </param> |
248 | /// <param name="resolvedFolders"> | 248 | /// <param name="resolvedFolders"> |
249 | /// The folders that we have resolved so far for a given archive path. | 249 | /// The folders that we have resolved so far for a given archive path. |
250 | /// </param> | 250 | /// </param> |
251 | /// <returns> | 251 | /// <returns> |
252 | /// The folder in the user's inventory that matches best the archive path given. If no such folder was found | 252 | /// The folder in the user's inventory that matches best the archive path given. If no such folder was found |
253 | /// then the passed in root destination folder is returned. | 253 | /// then the passed in root destination folder is returned. |
254 | /// </returns> | 254 | /// </returns> |
255 | protected InventoryFolderBase ResolveDestinationFolder( | 255 | protected InventoryFolderBase ResolveDestinationFolder( |
256 | InventoryFolderBase rootDestFolder, | 256 | InventoryFolderBase rootDestFolder, |
257 | ref string archivePath, | 257 | ref string archivePath, |
258 | Dictionary <string, InventoryFolderBase> resolvedFolders) | 258 | Dictionary <string, InventoryFolderBase> resolvedFolders) |
259 | { | 259 | { |
260 | // string originalArchivePath = archivePath; | 260 | // string originalArchivePath = archivePath; |
261 | 261 | ||
262 | while (archivePath.Length > 0) | 262 | while (archivePath.Length > 0) |
@@ -370,7 +370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
370 | 370 | ||
371 | if (0 == i) | 371 | if (0 == i) |
372 | loadedNodes.Add(destFolder); | 372 | loadedNodes.Add(destFolder); |
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
376 | /// <summary> | 376 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 9908018..bae5a7a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | 119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) |
120 | { | 120 | { |
121 | Exception reportedException = null; | 121 | Exception reportedException = null; |
122 | bool succeeded = true; | 122 | bool succeeded = true; |
123 | 123 | ||
124 | try | 124 | try |
125 | { | 125 | { |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
136 | finally | 136 | finally |
137 | { | 137 | { |
138 | m_saveStream.Close(); | 138 | m_saveStream.Close(); |
139 | } | 139 | } |
140 | 140 | ||
141 | m_module.TriggerInventoryArchiveSaved( | 141 | m_module.TriggerInventoryArchiveSaved( |
142 | m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); | 142 | m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); |
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
270 | { | 270 | { |
271 | // We couldn't find the path indicated | 271 | // We couldn't find the path indicated |
272 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); | 272 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); |
273 | Exception e = new InventoryArchiverException(errorMessage); | 273 | Exception e = new InventoryArchiverException(errorMessage); |
274 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); | 274 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); |
275 | throw e; | 275 | throw e; |
276 | } | 276 | } |
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
283 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", | 283 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", |
284 | inventoryFolder.Name, | 284 | inventoryFolder.Name, |
285 | inventoryFolder.ID, | 285 | inventoryFolder.ID, |
286 | m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath ); | 286 | m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath); |
287 | 287 | ||
288 | //recurse through all dirs getting dirs and files | 288 | //recurse through all dirs getting dirs and files |
289 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); | 289 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); |
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
301 | //SaveUsers(); | 301 | //SaveUsers(); |
302 | 302 | ||
303 | new AssetsRequest( | 303 | new AssetsRequest( |
304 | new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); | 304 | new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); |
305 | } | 305 | } |
306 | catch (Exception) | 306 | catch (Exception) |
307 | { | 307 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs index e07e2ca..5fd1a7e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
33 | /// Signals an inventory archiving problem | 33 | /// Signals an inventory archiving problem |
34 | /// </summary> | 34 | /// </summary> |
35 | public class InventoryArchiverException : Exception | 35 | public class InventoryArchiverException : Exception |
36 | { | 36 | { |
37 | public InventoryArchiverException(string message) : base(message) {} | 37 | public InventoryArchiverException(string message) : base(message) {} |
38 | public InventoryArchiverException(string message, Exception e) : base(message, e) {} | 38 | public InventoryArchiverException(string message, Exception e) : base(message, e) {} |
39 | } | 39 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index f03f2a1..2eaca49 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -91,12 +91,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
91 | 91 | ||
92 | scene.AddCommand( | 92 | scene.AddCommand( |
93 | this, "load iar", | 93 | this, "load iar", |
94 | "load iar <first> <last> <inventory path> <password> [<IAR path>]", | 94 | "load iar <first> <last> <inventory path> <password> [<IAR path>]", |
95 | //"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]", | 95 | //"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]", |
96 | "Load user inventory archive (IAR).", | 96 | "Load user inventory archive (IAR).", |
97 | //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" | 97 | //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" |
98 | //+ "<first> is user's first name." + Environment.NewLine | 98 | //+ "<first> is user's first name." + Environment.NewLine |
99 | "<first> is user's first name." + Environment.NewLine | 99 | "<first> is user's first name." + Environment.NewLine |
100 | + "<last> is user's last name." + Environment.NewLine | 100 | + "<last> is user's last name." + Environment.NewLine |
101 | + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine | 101 | + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine |
102 | + "<password> is the user's password." + Environment.NewLine | 102 | + "<password> is the user's password." + Environment.NewLine |
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
241 | if (CheckPresence(userInfo.PrincipalID)) | 241 | if (CheckPresence(userInfo.PrincipalID)) |
242 | { | 242 | { |
243 | InventoryArchiveReadRequest request; | 243 | InventoryArchiveReadRequest request; |
244 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); | 244 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); |
245 | 245 | ||
246 | try | 246 | try |
247 | { | 247 | { |
@@ -286,10 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
286 | if (CheckPresence(userInfo.PrincipalID)) | 286 | if (CheckPresence(userInfo.PrincipalID)) |
287 | { | 287 | { |
288 | InventoryArchiveReadRequest request; | 288 | InventoryArchiveReadRequest request; |
289 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); | 289 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); |
290 | 290 | ||
291 | try | 291 | try |
292 | { | 292 | { |
293 | request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); | 293 | request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); |
294 | } | 294 | } |
295 | catch (EntryPointNotFoundException e) | 295 | catch (EntryPointNotFoundException e) |
@@ -325,20 +325,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
325 | protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) | 325 | protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) |
326 | { | 326 | { |
327 | try | 327 | try |
328 | { | 328 | { |
329 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); | 329 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); |
330 | 330 | ||
331 | Dictionary<string, object> options = new Dictionary<string, object>(); | 331 | Dictionary<string, object> options = new Dictionary<string, object>(); |
332 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); | 332 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); |
333 | 333 | ||
334 | List<string> mainParams = optionSet.Parse(cmdparams); | 334 | List<string> mainParams = optionSet.Parse(cmdparams); |
335 | 335 | ||
336 | if (mainParams.Count < 6) | 336 | if (mainParams.Count < 6) |
337 | { | 337 | { |
338 | m_log.Error( | 338 | m_log.Error( |
339 | "[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]"); | 339 | "[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]"); |
340 | return; | 340 | return; |
341 | } | 341 | } |
342 | 342 | ||
343 | string firstName = mainParams[2]; | 343 | string firstName = mainParams[2]; |
344 | string lastName = mainParams[3]; | 344 | string lastName = mainParams[3]; |
@@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
353 | if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) | 353 | if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) |
354 | m_log.InfoFormat( | 354 | m_log.InfoFormat( |
355 | "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", | 355 | "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", |
356 | loadPath, firstName, lastName); | 356 | loadPath, firstName, lastName); |
357 | } | 357 | } |
358 | catch (InventoryArchiverException e) | 358 | catch (InventoryArchiverException e) |
359 | { | 359 | { |
@@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
390 | "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", | 390 | "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", |
391 | savePath, invPath, firstName, lastName); | 391 | savePath, invPath, firstName, lastName); |
392 | 392 | ||
393 | ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>()); | 393 | ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>()); |
394 | } | 394 | } |
395 | catch (InventoryArchiverException e) | 395 | catch (InventoryArchiverException e) |
396 | { | 396 | { |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
398 | } | 398 | } |
399 | 399 | ||
400 | lock (m_pendingConsoleSaves) | 400 | lock (m_pendingConsoleSaves) |
401 | m_pendingConsoleSaves.Add(id); | 401 | m_pendingConsoleSaves.Add(id); |
402 | } | 402 | } |
403 | 403 | ||
404 | private void SaveInvConsoleCommandCompleted( | 404 | private void SaveInvConsoleCommandCompleted( |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index d66a1d0..938886b2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -58,18 +58,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Stream of data representing a common IAR that can be reused in load tests. | 59 | /// Stream of data representing a common IAR that can be reused in load tests. |
60 | /// </summary> | 60 | /// </summary> |
61 | protected MemoryStream m_iarStream; | 61 | protected MemoryStream m_iarStream; |
62 | 62 | ||
63 | protected UserAccount m_ua1 | 63 | protected UserAccount m_ua1 |
64 | = new UserAccount { | 64 | = new UserAccount { |
65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), | 65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), |
66 | FirstName = "Mr", | 66 | FirstName = "Mr", |
67 | LastName = "Tiddles" }; | 67 | LastName = "Tiddles" }; |
68 | protected UserAccount m_ua2 | 68 | protected UserAccount m_ua2 |
69 | = new UserAccount { | 69 | = new UserAccount { |
70 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 70 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
71 | FirstName = "Lord", | 71 | FirstName = "Lord", |
72 | LastName = "Lucan" }; | 72 | LastName = "Lucan" }; |
73 | string m_item1Name = "b.lsl"; | 73 | string m_item1Name = "b.lsl"; |
74 | 74 | ||
75 | private void SaveCompleted( | 75 | private void SaveCompleted( |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
86 | } | 86 | } |
87 | 87 | ||
88 | protected void ConstructDefaultIarForTestLoad() | 88 | protected void ConstructDefaultIarForTestLoad() |
89 | { | 89 | { |
90 | string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); | 90 | string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); |
91 | 91 | ||
92 | MemoryStream archiveWriteStream = new MemoryStream(); | 92 | MemoryStream archiveWriteStream = new MemoryStream(); |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
104 | string item1FileName | 104 | string item1FileName |
105 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); | 105 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); |
106 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); | 106 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); |
107 | tar.Close(); | 107 | tar.Close(); |
108 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); | 108 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); |
109 | } | 109 | } |
110 | 110 | ||
@@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
341 | // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); | 341 | // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); |
342 | 342 | ||
343 | // TODO: Test presence of more files and contents of files. | 343 | // TODO: Test presence of more files and contents of files. |
344 | } | 344 | } |
345 | 345 | ||
346 | /// <summary> | 346 | /// <summary> |
347 | /// Test that things work when the load path specified starts with a slash | 347 | /// Test that things work when the load path specified starts with a slash |
@@ -349,22 +349,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
349 | [Test] | 349 | [Test] |
350 | public void TestLoadIarPathStartsWithSlash() | 350 | public void TestLoadIarPathStartsWithSlash() |
351 | { | 351 | { |
352 | TestHelper.InMethod(); | 352 | TestHelper.InMethod(); |
353 | // log4net.Config.XmlConfigurator.Configure(); | 353 | // log4net.Config.XmlConfigurator.Configure(); |
354 | 354 | ||
355 | SerialiserModule serialiserModule = new SerialiserModule(); | 355 | SerialiserModule serialiserModule = new SerialiserModule(); |
356 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); | 356 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); |
357 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 357 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
358 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 358 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
359 | 359 | ||
360 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); | 360 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); |
361 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); | 361 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); |
362 | 362 | ||
363 | InventoryItemBase foundItem1 | 363 | InventoryItemBase foundItem1 |
364 | = InventoryArchiveUtils.FindItemByPath( | 364 | = InventoryArchiveUtils.FindItemByPath( |
365 | scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); | 365 | scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); |
366 | 366 | ||
367 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); | 367 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); |
368 | } | 368 | } |
369 | 369 | ||
370 | /// <summary> | 370 | /// <summary> |
@@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
376 | [Test] | 376 | [Test] |
377 | public void TestLoadIarV0_1ExistingUsers() | 377 | public void TestLoadIarV0_1ExistingUsers() |
378 | { | 378 | { |
379 | TestHelper.InMethod(); | 379 | TestHelper.InMethod(); |
380 | //log4net.Config.XmlConfigurator.Configure(); | 380 | //log4net.Config.XmlConfigurator.Configure(); |
381 | 381 | ||
382 | SerialiserModule serialiserModule = new SerialiserModule(); | 382 | SerialiserModule serialiserModule = new SerialiserModule(); |
@@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
386 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 386 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
387 | 387 | ||
388 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 388 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
389 | 389 | ||
390 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); | 390 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); |
391 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); | 391 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); |
392 | 392 | ||
393 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); | 393 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); |
394 | 394 | ||
@@ -450,7 +450,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
450 | string userFirstName = "Jock"; | 450 | string userFirstName = "Jock"; |
451 | string userLastName = "Stirrup"; | 451 | string userLastName = "Stirrup"; |
452 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 452 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
453 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); | 453 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); |
454 | 454 | ||
455 | // Create asset | 455 | // Create asset |
456 | SceneObjectGroup object1; | 456 | SceneObjectGroup object1; |
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
524 | [Test] | 524 | [Test] |
525 | public void TestLoadIarV0_1AbsentUsers() | 525 | public void TestLoadIarV0_1AbsentUsers() |
526 | { | 526 | { |
527 | TestHelper.InMethod(); | 527 | TestHelper.InMethod(); |
528 | //log4net.Config.XmlConfigurator.Configure(); | 528 | //log4net.Config.XmlConfigurator.Configure(); |
529 | 529 | ||
530 | string userFirstName = "Charlie"; | 530 | string userFirstName = "Charlie"; |
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
562 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 562 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
563 | 563 | ||
564 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 564 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
565 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); | 565 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); |
566 | 566 | ||
567 | archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); | 567 | archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); |
568 | 568 | ||
@@ -680,8 +680,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
680 | string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); | 680 | string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); |
681 | string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); | 681 | string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); |
682 | 682 | ||
683 | string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); | 683 | string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); |
684 | string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); | 684 | string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); |
685 | 685 | ||
686 | { | 686 | { |
687 | // Test replication of path1 | 687 | // Test replication of path1 |
@@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
694 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); | 694 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); |
695 | Assert.That(folder1Candidates.Count, Is.EqualTo(1)); | 695 | Assert.That(folder1Candidates.Count, Is.EqualTo(1)); |
696 | 696 | ||
697 | InventoryFolderBase folder1 = folder1Candidates[0]; | 697 | InventoryFolderBase folder1 = folder1Candidates[0]; |
698 | List<InventoryFolderBase> folder2aCandidates | 698 | List<InventoryFolderBase> folder2aCandidates |
699 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); | 699 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); |
700 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); | 700 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); |
@@ -715,11 +715,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
715 | 715 | ||
716 | List<InventoryFolderBase> folder2aCandidates | 716 | List<InventoryFolderBase> folder2aCandidates |
717 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); | 717 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); |
718 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); | 718 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); |
719 | 719 | ||
720 | List<InventoryFolderBase> folder2bCandidates | 720 | List<InventoryFolderBase> folder2bCandidates |
721 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); | 721 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); |
722 | Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); | 722 | Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); |
723 | } | 723 | } |
724 | } | 724 | } |
725 | 725 | ||
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
741 | 741 | ||
742 | InventoryFolderBase folder1 | 742 | InventoryFolderBase folder1 |
743 | = UserInventoryTestUtils.CreateInventoryFolder( | 743 | = UserInventoryTestUtils.CreateInventoryFolder( |
744 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | 744 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); |
745 | 745 | ||
746 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); | 746 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); |
747 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | 747 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
@@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
772 | List<InventoryFolderBase> folder2PostCandidates | 772 | List<InventoryFolderBase> folder2PostCandidates |
773 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); | 773 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); |
774 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); | 774 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); |
775 | } | 775 | } |
776 | 776 | ||
777 | /// <summary> | 777 | /// <summary> |
778 | /// Test replication of a partly existing archive path to the user's inventory. This should create | 778 | /// Test replication of a partly existing archive path to the user's inventory. This should create |
@@ -792,7 +792,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
792 | 792 | ||
793 | InventoryFolderBase folder1 | 793 | InventoryFolderBase folder1 |
794 | = UserInventoryTestUtils.CreateInventoryFolder( | 794 | = UserInventoryTestUtils.CreateInventoryFolder( |
795 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | 795 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); |
796 | 796 | ||
797 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); | 797 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); |
798 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | 798 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
@@ -812,6 +812,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
812 | List<InventoryFolderBase> folder2PostCandidates | 812 | List<InventoryFolderBase> folder2PostCandidates |
813 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); | 813 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); |
814 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); | 814 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); |
815 | } | 815 | } |
816 | } | 816 | } |
817 | } \ No newline at end of file | 817 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 35b70de..05fe3ee 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | |||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
138 | { | 138 | { |
139 | if (!queues.ContainsKey(agentId)) | 139 | if (!queues.ContainsKey(agentId)) |
140 | { | 140 | { |
141 | /* | 141 | /* |
142 | m_log.DebugFormat( | 142 | m_log.DebugFormat( |
143 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", | 143 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", |
144 | agentId, m_scene.RegionInfo.RegionName); | 144 | agentId, m_scene.RegionInfo.RegionName); |
@@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
701 | 701 | ||
702 | public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) | 702 | public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) |
703 | { | 703 | { |
704 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); | 704 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); |
705 | Enqueue(item, avatarID); | 705 | Enqueue(item, avatarID); |
706 | } | 706 | } |
707 | 707 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index b62df18..0d7d16a 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
55 | } | 55 | } |
56 | 56 | ||
57 | // private static byte[] uintToByteArray(uint uIntValue) | 57 | // private static byte[] uintToByteArray(uint uIntValue) |
58 | // { | 58 | // { |
59 | // byte[] result = new byte[4]; | 59 | // byte[] result = new byte[4]; |
60 | // Utils.UIntToBytesBig(uIntValue, result, 0); | 60 | // Utils.UIntToBytesBig(uIntValue, result, 0); |
61 | // return result; | 61 | // return result; |
@@ -386,14 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
386 | return placesReply; | 386 | return placesReply; |
387 | } | 387 | } |
388 | 388 | ||
389 | public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) | 389 | public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) |
390 | { | 390 | { |
391 | OSDMap message = new OSDMap(); | 391 | OSDMap message = new OSDMap(); |
392 | message.Add("message", OSD.FromString("ParcelProperties")); | 392 | message.Add("message", OSD.FromString("ParcelProperties")); |
393 | OSD message_body = parcelPropertiesMessage.Serialize(); | 393 | OSD message_body = parcelPropertiesMessage.Serialize(); |
394 | message.Add("body", message_body); | 394 | message.Add("body", message_body); |
395 | return message; | 395 | return message; |
396 | } | 396 | } |
397 | 397 | ||
398 | } | 398 | } |
399 | } | 399 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d87f7f1..4c4eeff 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -594,7 +594,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
594 | rootPart.Name = item.Name; | 594 | rootPart.Name = item.Name; |
595 | rootPart.Description = item.Description; | 595 | rootPart.Description = item.Description; |
596 | 596 | ||
597 | List<SceneObjectPart> partList = null; | 597 | List<SceneObjectPart> partList = null; |
598 | lock (group.Children) | 598 | lock (group.Children) |
599 | partList = new List<SceneObjectPart>(group.Children.Values); | 599 | partList = new List<SceneObjectPart>(group.Children.Values); |
600 | 600 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs index b75a700..a75ff62 100644 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
49 | protected bool m_collectStats; | 49 | protected bool m_collectStats; |
50 | protected Scene m_scene = null; | 50 | protected Scene m_scene = null; |
51 | 51 | ||
52 | public string Name { get { return "Binary Statistics Logging Module"; } } | 52 | public string Name { get { return "Binary Statistics Logging Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) | 55 | public void Initialise(IConfigSource source) |
56 | { | 56 | { |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
79 | catch | 79 | catch |
80 | { | 80 | { |
81 | // if it doesn't work, we don't collect anything | 81 | // if it doesn't work, we don't collect anything |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | public void AddRegion(Scene scene) | 85 | public void AddRegion(Scene scene) |
@@ -94,12 +94,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
94 | public void RegionLoaded(Scene scene) | 94 | public void RegionLoaded(Scene scene) |
95 | { | 95 | { |
96 | if (m_collectStats) | 96 | if (m_collectStats) |
97 | m_scene.StatsReporter.OnSendStatsResult += LogSimStats; | 97 | m_scene.StatsReporter.OnSendStatsResult += LogSimStats; |
98 | } | 98 | } |
99 | 99 | ||
100 | public void Close() | 100 | public void Close() |
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | public class StatLogger | 104 | public class StatLogger |
105 | { | 105 | { |
@@ -164,6 +164,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
164 | } | 164 | } |
165 | } | 165 | } |
166 | return; | 166 | return; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | } | 169 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 4e2f602..2322d7c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
185 | return folders[type]; | 185 | return folders[type]; |
186 | } | 186 | } |
187 | 187 | ||
188 | m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); | 188 | m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); |
189 | 189 | ||
190 | return null; | 190 | return null; |
191 | } | 191 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index cbd9e05..ab6be50 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
220 | { | 220 | { |
221 | // m_log.DebugFormat( | 221 | // m_log.DebugFormat( |
222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", | 222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", |
223 | // item.Name, item.Owner, item.Folder); | 223 | // item.Name, item.Owner, item.Folder); |
224 | 224 | ||
225 | return m_InventoryService.AddItem(item); | 225 | return m_InventoryService.AddItem(item); |
226 | } | 226 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 4ab6947..34205e3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
227 | public bool AddItem(InventoryItemBase item) | 227 | public bool AddItem(InventoryItemBase item) |
228 | { | 228 | { |
229 | if (item == null) | 229 | if (item == null) |
230 | return false; | 230 | return false; |
231 | 231 | ||
232 | return m_RemoteConnector.AddItem(item); | 232 | return m_RemoteConnector.AddItem(item); |
233 | } | 233 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ddc3dd7..c72acc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization; | |||
33 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | 34 | ||
35 | namespace OpenSim.Region.CoreModules.World.Archiver | 35 | namespace OpenSim.Region.CoreModules.World.Archiver |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Helper methods for archive manipulation | 38 | /// Helper methods for archive manipulation |
39 | /// </summary> | 39 | /// </summary> |
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
50 | public static string CreateObjectFilename(SceneObjectGroup sog) | 50 | public static string CreateObjectFilename(SceneObjectGroup sog) |
51 | { | 51 | { |
52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); | 52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Create the path used to store an object in an OpenSim Archive. | 56 | /// Create the path used to store an object in an OpenSim Archive. |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
62 | public static string CreateObjectPath(SceneObjectGroup sog) | 62 | public static string CreateObjectPath(SceneObjectGroup sog) |
63 | { | 63 | { |
64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); | 64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Resolve path to a working FileStream | 68 | /// Resolve path to a working FileStream |
@@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
123 | 123 | ||
124 | // return new BufferedStream(file, (int) response.ContentLength); | 124 | // return new BufferedStream(file, (int) response.ContentLength); |
125 | return new BufferedStream(file, 1000000); | 125 | return new BufferedStream(file, 1000000); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } \ No newline at end of file | 128 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ea71fd9..634685a 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | #pragma warning restore 0429 | 72 | #pragma warning restore 0429 |
73 | 73 | ||
74 | /// <value> | 74 | /// <value> |
75 | /// Local land ids at specified region co-ordinates (region size / 4) | 75 | /// Local land ids at specified region co-ordinates (region size / 4) |
76 | /// </value> | 76 | /// </value> |
77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
78 | 78 | ||
79 | /// <value> | 79 | /// <value> |
80 | /// Land objects keyed by local id | 80 | /// Land objects keyed by local id |
81 | /// </value> | 81 | /// </value> |
82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
83 | 83 | ||
@@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
92 | 92 | ||
93 | #region INonSharedRegionModule Members | 93 | #region INonSharedRegionModule Members |
94 | 94 | ||
95 | public Type ReplaceableInterface | 95 | public Type ReplaceableInterface |
96 | { | 96 | { |
97 | get { return null; } | 97 | get { return null; } |
98 | } | 98 | } |
99 | 99 | ||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
192 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 192 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
193 | forcedPosition = null; | 193 | forcedPosition = null; |
194 | } | 194 | } |
195 | //if we are far away, teleport | 195 | //if we are far away, teleport |
196 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 196 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) |
197 | { | 197 | { |
198 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 198 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
@@ -321,8 +321,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | |||
325 | |||
326 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) | 324 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) |
327 | { | 325 | { |
328 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 326 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
@@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
336 | { | 334 | { |
337 | avatar.ControllingClient.SendAlertMessage( | 335 | avatar.ControllingClient.SendAlertMessage( |
338 | "You are not allowed on this parcel because the land owner has restricted access."); | 336 | "You are not allowed on this parcel because the land owner has restricted access."); |
339 | |||
340 | } | 337 | } |
341 | 338 | ||
342 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | 339 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) |
@@ -448,7 +445,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
448 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 445 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
449 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) | 446 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
450 | { | 447 | { |
451 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, | 448 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
452 | m_scene.RegionInfo.RegionID); | 449 | m_scene.RegionInfo.RegionID); |
453 | //They are going under the safety line! | 450 | //They are going under the safety line! |
454 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | 451 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) |
@@ -652,7 +649,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
652 | 649 | ||
653 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) | 650 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) |
654 | return null; | 651 | return null; |
655 | 652 | ||
656 | try | 653 | try |
657 | { | 654 | { |
658 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 655 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
667 | { | 664 | { |
668 | return null; | 665 | return null; |
669 | } | 666 | } |
670 | 667 | ||
671 | lock (m_landList) | 668 | lock (m_landList) |
672 | { | 669 | { |
673 | // Corner case. If an autoreturn happens during sim startup | 670 | // Corner case. If an autoreturn happens during sim startup |
@@ -687,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
687 | // they happen every time at border crossings | 684 | // they happen every time at border crossings |
688 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 685 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
689 | } | 686 | } |
690 | 687 | ||
691 | lock (m_landIDList) | 688 | lock (m_landIDList) |
692 | { | 689 | { |
693 | try | 690 | try |
@@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
741 | 738 | ||
742 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) | 739 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) |
743 | { | 740 | { |
744 | |||
745 | lock (m_landList) | 741 | lock (m_landList) |
746 | { | 742 | { |
747 | foreach (LandObject p in m_landList.Values) | 743 | foreach (LandObject p in m_landList.Values) |
@@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
936 | return; | 932 | return; |
937 | } | 933 | } |
938 | } | 934 | } |
939 | 935 | ||
940 | lock (m_landList) | 936 | lock (m_landList) |
941 | { | 937 | { |
942 | foreach (ILandObject slaveLandObject in selectedLandObjects) | 938 | foreach (ILandObject slaveLandObject in selectedLandObjects) |
@@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1078 | temp.Add(currentParcel); | 1074 | temp.Add(currentParcel); |
1079 | } | 1075 | } |
1080 | } | 1076 | } |
1081 | |||
1082 | } | 1077 | } |
1083 | } | 1078 | } |
1084 | 1079 | ||
@@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1121 | join(west, south, east, north, remote_client.AgentId); | 1116 | join(west, south, east, north, remote_client.AgentId); |
1122 | } | 1117 | } |
1123 | 1118 | ||
1124 | public void ClientOnParcelSelectObjects(int local_id, int request_type, | 1119 | public void ClientOnParcelSelectObjects(int local_id, int request_type, |
1125 | List<UUID> returnIDs, IClientAPI remote_client) | 1120 | List<UUID> returnIDs, IClientAPI remote_client) |
1126 | { | 1121 | { |
1127 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); | 1122 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); |
@@ -1358,31 +1353,31 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1358 | { | 1353 | { |
1359 | return RemoteParcelRequest(request, path, param, agentID, caps); | 1354 | return RemoteParcelRequest(request, path, param, agentID, caps); |
1360 | })); | 1355 | })); |
1361 | UUID parcelCapID = UUID.Random(); | 1356 | UUID parcelCapID = UUID.Random(); |
1362 | caps.RegisterHandler("ParcelPropertiesUpdate", | 1357 | caps.RegisterHandler("ParcelPropertiesUpdate", |
1363 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, | 1358 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, |
1364 | delegate(string request, string path, string param, | 1359 | delegate(string request, string path, string param, |
1365 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 1360 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
1366 | { | 1361 | { |
1367 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); | 1362 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); |
1368 | })); | 1363 | })); |
1369 | } | 1364 | } |
1370 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1365 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1371 | { | 1366 | { |
1372 | IClientAPI client; | 1367 | IClientAPI client; |
1373 | if ( ! m_scene.TryGetClient(agentID, out client) ) { | 1368 | if (! m_scene.TryGetClient(agentID, out client)) { |
1374 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); | 1369 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString()); |
1375 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1370 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1376 | } | 1371 | } |
1377 | 1372 | ||
1378 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); | 1373 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); |
1379 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); | 1374 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); |
1380 | 1375 | ||
1381 | properties.Deserialize(args); | 1376 | properties.Deserialize(args); |
1382 | 1377 | ||
1383 | LandUpdateArgs land_update = new LandUpdateArgs(); | 1378 | LandUpdateArgs land_update = new LandUpdateArgs(); |
1384 | int parcelID = properties.LocalID; | 1379 | int parcelID = properties.LocalID; |
1385 | land_update.AuthBuyerID = properties.AuthBuyerID; | 1380 | land_update.AuthBuyerID = properties.AuthBuyerID; |
1386 | land_update.Category = properties.Category; | 1381 | land_update.Category = properties.Category; |
1387 | land_update.Desc = properties.Desc; | 1382 | land_update.Desc = properties.Desc; |
1388 | land_update.GroupID = properties.GroupID; | 1383 | land_update.GroupID = properties.GroupID; |
@@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1399 | land_update.SnapshotID = properties.SnapshotID; | 1394 | land_update.SnapshotID = properties.SnapshotID; |
1400 | land_update.UserLocation = properties.UserLocation; | 1395 | land_update.UserLocation = properties.UserLocation; |
1401 | land_update.UserLookAt = properties.UserLookAt; | 1396 | land_update.UserLookAt = properties.UserLookAt; |
1402 | land_update.MediaDescription = properties.MediaDesc; | 1397 | land_update.MediaDescription = properties.MediaDesc; |
1403 | land_update.MediaType = properties.MediaType; | 1398 | land_update.MediaType = properties.MediaType; |
1404 | land_update.MediaWidth = properties.MediaWidth; | 1399 | land_update.MediaWidth = properties.MediaWidth; |
1405 | land_update.MediaHeight = properties.MediaHeight; | 1400 | land_update.MediaHeight = properties.MediaHeight; |
1406 | land_update.MediaLoop = properties.MediaLoop; | 1401 | land_update.MediaLoop = properties.MediaLoop; |
1407 | land_update.ObscureMusic = properties.ObscureMusic; | 1402 | land_update.ObscureMusic = properties.ObscureMusic; |
1408 | land_update.ObscureMedia = properties.ObscureMedia; | 1403 | land_update.ObscureMedia = properties.ObscureMedia; |
1409 | 1404 | ||
1410 | ILandObject land; | 1405 | ILandObject land; |
1411 | lock (m_landList) | 1406 | lock (m_landList) |
1412 | { | 1407 | { |
1413 | m_landList.TryGetValue(parcelID, out land); | 1408 | m_landList.TryGetValue(parcelID, out land); |
@@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1415 | 1410 | ||
1416 | if (land != null) | 1411 | if (land != null) |
1417 | { | 1412 | { |
1418 | land.UpdateLandProperties(land_update, client); | 1413 | land.UpdateLandProperties(land_update, client); |
1419 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); | 1414 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); |
1420 | } | 1415 | } |
1421 | else | 1416 | else |
1422 | { | 1417 | { |
1423 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); | 1418 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); |
1424 | } | 1419 | } |
1425 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1420 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1426 | } | 1421 | } |
1427 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1422 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1428 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1423 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
1429 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x | 1424 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x |
@@ -1500,19 +1495,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1500 | if (parcelID == UUID.Zero) | 1495 | if (parcelID == UUID.Zero) |
1501 | return; | 1496 | return; |
1502 | 1497 | ||
1503 | ExtendedLandData data = | 1498 | ExtendedLandData data = |
1504 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), | 1499 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), |
1505 | delegate(string id) | 1500 | delegate(string id) |
1506 | { | 1501 | { |
1507 | UUID parcel = UUID.Zero; | 1502 | UUID parcel = UUID.Zero; |
1508 | UUID.TryParse(id, out parcel); | 1503 | UUID.TryParse(id, out parcel); |
1509 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1504 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1510 | ExtendedLandData extLandData = new ExtendedLandData(); | 1505 | ExtendedLandData extLandData = new ExtendedLandData(); |
1511 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 1506 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
1512 | out extLandData.X, out extLandData.Y); | 1507 | out extLandData.X, out extLandData.Y); |
1513 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 1508 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
1514 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 1509 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
1515 | 1510 | ||
1516 | // for this region or for somewhere else? | 1511 | // for this region or for somewhere else? |
1517 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 1512 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
1518 | { | 1513 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 499b60c..d87352f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
229 | newData.SnapshotID = args.SnapshotID; | 229 | newData.SnapshotID = args.SnapshotID; |
230 | newData.UserLocation = args.UserLocation; | 230 | newData.UserLocation = args.UserLocation; |
231 | newData.UserLookAt = args.UserLookAt; | 231 | newData.UserLookAt = args.UserLookAt; |
232 | newData.MediaType = args.MediaType; | 232 | newData.MediaType = args.MediaType; |
233 | newData.MediaDescription = args.MediaDescription; | 233 | newData.MediaDescription = args.MediaDescription; |
234 | newData.MediaWidth = args.MediaWidth; | 234 | newData.MediaWidth = args.MediaWidth; |
235 | newData.MediaHeight = args.MediaHeight; | 235 | newData.MediaHeight = args.MediaHeight; |
236 | newData.MediaLoop = args.MediaLoop; | 236 | newData.MediaLoop = args.MediaLoop; |
237 | newData.ObscureMusic = args.ObscureMusic; | 237 | newData.ObscureMusic = args.ObscureMusic; |
238 | newData.ObscureMedia = args.ObscureMedia; | 238 | newData.ObscureMedia = args.ObscureMedia; |
239 | 239 | ||
240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
241 | 241 | ||
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 82ad109..7c5d044 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
54 | { | 54 | { |
55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] | 55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] |
56 | public class MoapModule : INonSharedRegionModule, IMoapModule | 56 | public class MoapModule : INonSharedRegionModule, IMoapModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | public string Name { get { return "MoapModule"; } } | 60 | public string Name { get { return "MoapModule"; } } |
61 | public Type ReplaceableInterface { get { return null; } } | 61 | public Type ReplaceableInterface { get { return null; } } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Is this module enabled? | 64 | /// Is this module enabled? |
@@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. | 79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. |
80 | /// </summary> | 80 | /// </summary> |
81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); | 81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path | 84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path |
85 | /// </summary> | 85 | /// </summary> |
86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); | 86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate | 89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate |
90 | /// </summary> | 90 | /// </summary> |
91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); | 91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); |
92 | 92 | ||
93 | public void Initialise(IConfigSource configSource) | 93 | public void Initialise(IConfigSource configSource) |
94 | { | 94 | { |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; | 129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; |
130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; | 130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; |
131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; | 131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; |
132 | } | 132 | } |
133 | 133 | ||
134 | public void OnRegisterCaps(UUID agentID, Caps caps) | 134 | public void OnRegisterCaps(UUID agentID, Caps caps) |
135 | { | 135 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
159 | caps.RegisterHandler( | 159 | caps.RegisterHandler( |
160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); | 160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | public void OnDeregisterCaps(UUID agentID, Caps caps) | 164 | public void OnDeregisterCaps(UUID agentID, Caps caps) |
165 | { | 165 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
179 | } | 179 | } |
180 | 180 | ||
181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) | 181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
182 | { | 182 | { |
183 | if (original.Shape.Media != null) | 183 | if (original.Shape.Media != null) |
184 | { | 184 | { |
185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); | 185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
195 | } | 195 | } |
196 | 196 | ||
197 | copy.Shape.Media = dupeMedia; | 197 | copy.Shape.Media = dupeMedia; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) | 201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) |
@@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
211 | me = null; | 211 | me = null; |
212 | } | 212 | } |
213 | else | 213 | else |
214 | { | 214 | { |
215 | lock (media) | 215 | lock (media) |
216 | me = media[face]; | 216 | me = media[face]; |
217 | 217 | ||
218 | // TODO: Really need a proper copy constructor down in libopenmetaverse | 218 | // TODO: Really need a proper copy constructor down in libopenmetaverse |
219 | if (me != null) | 219 | if (me != null) |
@@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | 227 | ||
228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) | 228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) |
229 | { | 229 | { |
230 | CheckFaceParam(part, face); | 230 | CheckFaceParam(part, face); |
231 | 231 | ||
232 | if (null == part.Shape.Media) | 232 | if (null == part.Shape.Media) |
233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); | 233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); |
234 | 234 | ||
235 | lock (part.Shape.Media) | 235 | lock (part.Shape.Media) |
236 | part.Shape.Media[face] = me; | 236 | part.Shape.Media[face] = me; |
237 | 237 | ||
238 | UpdateMediaUrl(part, UUID.Zero); | 238 | UpdateMediaUrl(part, UUID.Zero); |
239 | part.ScheduleFullUpdate(); | 239 | part.ScheduleFullUpdate(); |
240 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 240 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
241 | } | 241 | } |
242 | 242 | ||
243 | public void ClearMediaEntry(SceneObjectPart part, int face) | 243 | public void ClearMediaEntry(SceneObjectPart part, int face) |
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
256 | /// <returns></returns> | 256 | /// <returns></returns> |
257 | protected string HandleObjectMediaMessage( | 257 | protected string HandleObjectMediaMessage( |
258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
259 | { | 259 | { |
260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); | 260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); |
261 | 261 | ||
262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
266 | if (omm.Request is ObjectMediaRequest) | 266 | if (omm.Request is ObjectMediaRequest) |
267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); | 267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); |
268 | else if (omm.Request is ObjectMediaUpdate) | 268 | else if (omm.Request is ObjectMediaUpdate) |
269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); | 269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); |
270 | 270 | ||
271 | throw new Exception( | 271 | throw new Exception( |
272 | string.Format( | 272 | string.Format( |
273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", | 273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", |
274 | omm.Request.GetType())); | 274 | omm.Request.GetType())); |
275 | } | 275 | } |
276 | 276 | ||
277 | /// <summary> | 277 | /// <summary> |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
279 | /// </summary> | 279 | /// </summary> |
280 | /// <param name="omr"></param> | 280 | /// <param name="omr"></param> |
281 | /// <returns></returns> | 281 | /// <returns></returns> |
282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) | 282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) |
283 | { | 283 | { |
284 | UUID primId = omr.PrimID; | 284 | UUID primId = omr.PrimID; |
285 | 285 | ||
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
318 | /// <param name="path">Path on which this request was made</param> | 318 | /// <param name="path">Path on which this request was made</param> |
319 | /// <param name="omu">/param> | 319 | /// <param name="omu">/param> |
320 | /// <returns></returns> | 320 | /// <returns></returns> |
321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) | 321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) |
322 | { | 322 | { |
323 | UUID primId = omu.PrimID; | 323 | UUID primId = omu.PrimID; |
324 | 324 | ||
@@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", | 330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", |
331 | primId, m_scene.RegionInfo.RegionName); | 331 | primId, m_scene.RegionInfo.RegionName); |
332 | return string.Empty; | 332 | return string.Empty; |
333 | } | 333 | } |
334 | 334 | ||
335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
336 | 336 | ||
337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | 337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) |
338 | // { | 338 | // { |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
374 | part.Shape.Textures = te; | 374 | part.Shape.Textures = te; |
375 | // m_log.DebugFormat( | 375 | // m_log.DebugFormat( |
376 | // "[MOAP]: Media flags for face {0} is {1}", | 376 | // "[MOAP]: Media flags for face {0} is {1}", |
377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); | 377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
381 | else | 381 | else |
382 | { | 382 | { |
383 | // We need to go through the media textures one at a time to make sure that we have permission | 383 | // We need to go through the media textures one at a time to make sure that we have permission |
384 | // to change them | 384 | // to change them |
385 | 385 | ||
386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get | 386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get |
387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry | 387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry |
@@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
391 | lock (media) | 391 | lock (media) |
392 | { | 392 | { |
393 | for (int i = 0; i < media.Count; i++) | 393 | for (int i = 0; i < media.Count; i++) |
394 | { | 394 | { |
395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) | 395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) |
396 | { | 396 | { |
397 | media[i] = omu.FaceMedia[i]; | 397 | media[i] = omu.FaceMedia[i]; |
398 | 398 | ||
399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal | 399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal |
400 | // texture update, so we don't need to worry about clearing MediaFlags here. | 400 | // texture update, so we don't need to worry about clearing MediaFlags here. |
401 | if (null == media[i]) | 401 | if (null == media[i]) |
402 | continue; | 402 | continue; |
403 | 403 | ||
404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); | 404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); |
405 | face.MediaFlags = true; | 405 | face.MediaFlags = true; |
406 | 406 | ||
407 | // m_log.DebugFormat( | 407 | // m_log.DebugFormat( |
408 | // "[MOAP]: Media flags for face {0} is {1}", | 408 | // "[MOAP]: Media flags for face {0} is {1}", |
@@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
414 | 414 | ||
415 | part.Shape.Textures = te; | 415 | part.Shape.Textures = te; |
416 | 416 | ||
417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) | 417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) |
418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); | 418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); |
419 | } | 419 | } |
420 | 420 | ||
421 | UpdateMediaUrl(part, agentId); | 421 | UpdateMediaUrl(part, agentId); |
422 | 422 | ||
423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. | 423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. |
424 | part.ScheduleFullUpdate(); | 424 | part.ScheduleFullUpdate(); |
@@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
439 | /// <returns></returns> | 439 | /// <returns></returns> |
440 | protected string HandleObjectMediaNavigateMessage( | 440 | protected string HandleObjectMediaNavigateMessage( |
441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
442 | { | 442 | { |
443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); | 443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); |
444 | 444 | ||
445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); | 446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); |
447 | omn.Deserialize(osd); | 447 | omn.Deserialize(osd); |
448 | 448 | ||
449 | UUID primId = omn.PrimID; | 449 | UUID primId = omn.PrimID; |
450 | 450 | ||
451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); | 451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); |
452 | 452 | ||
453 | if (null == part) | 453 | if (null == part) |
454 | { | 454 | { |
@@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", | 456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", |
457 | primId, m_scene.RegionInfo.RegionName); | 457 | primId, m_scene.RegionInfo.RegionName); |
458 | return string.Empty; | 458 | return string.Empty; |
459 | } | 459 | } |
460 | 460 | ||
461 | UUID agentId = default(UUID); | 461 | UUID agentId = default(UUID); |
462 | 462 | ||
463 | lock (m_omuCapUsers) | 463 | lock (m_omuCapUsers) |
464 | agentId = m_omuCapUsers[path]; | 464 | agentId = m_omuCapUsers[path]; |
465 | 465 | ||
466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) | 466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) |
467 | return string.Empty; | 467 | return string.Empty; |
@@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
484 | return string.Empty; | 484 | return string.Empty; |
485 | 485 | ||
486 | if (me.EnableWhiteList) | 486 | if (me.EnableWhiteList) |
487 | { | 487 | { |
488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) | 488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) |
489 | { | 489 | { |
490 | // m_log.DebugFormat( | 490 | // m_log.DebugFormat( |
@@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
493 | 493 | ||
494 | return string.Empty; | 494 | return string.Empty; |
495 | } | 495 | } |
496 | } | 496 | } |
497 | 497 | ||
498 | me.CurrentURL = omn.URL; | 498 | me.CurrentURL = omn.URL; |
499 | 499 | ||
500 | UpdateMediaUrl(part, agentId); | 500 | UpdateMediaUrl(part, agentId); |
501 | 501 | ||
502 | part.ScheduleFullUpdate(); | 502 | part.ScheduleFullUpdate(); |
503 | 503 | ||
504 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 504 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
505 | 505 | ||
506 | return OSDParser.SerializeLLSDXmlString(new OSD()); | 506 | return OSDParser.SerializeLLSDXmlString(new OSD()); |
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// Check that the face number is valid for the given prim. | 510 | /// Check that the face number is valid for the given prim. |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
519 | int maxFaces = part.GetNumberOfSides() - 1; | 519 | int maxFaces = part.GetNumberOfSides() - 1; |
520 | if (face > maxFaces) | 520 | if (face > maxFaces) |
521 | throw new ArgumentException( | 521 | throw new ArgumentException( |
522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); | 522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); |
523 | } | 523 | } |
524 | 524 | ||
525 | /// <summary> | 525 | /// <summary> |
@@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
542 | string rawVersion = part.MediaUrl.Substring(5, 10); | 542 | string rawVersion = part.MediaUrl.Substring(5, 10); |
543 | int version = int.Parse(rawVersion); | 543 | int version = int.Parse(rawVersion); |
544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); | 544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); |
545 | } | 545 | } |
546 | 546 | ||
547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); | 547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); |
548 | } | 548 | } |
549 | 549 | ||
550 | /// <summary> | 550 | /// <summary> |
@@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
554 | /// <param name="whitelist"></param> | 554 | /// <param name="whitelist"></param> |
555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> | 555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> |
556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) | 556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) |
557 | { | 557 | { |
558 | Uri url = new Uri(rawUrl); | 558 | Uri url = new Uri(rawUrl); |
559 | 559 | ||
560 | foreach (string origWlUrl in whitelist) | 560 | foreach (string origWlUrl in whitelist) |
@@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
575 | if (url.Host.Contains(wlUrl)) | 575 | if (url.Host.Contains(wlUrl)) |
576 | { | 576 | { |
577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); | 577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); |
578 | return true; | 578 | return true; |
579 | } | 579 | } |
580 | } | 580 | } |
581 | else | 581 | else |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | return false; | 593 | return false; |
594 | } | 594 | } |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 12750c5..db50339 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
49 | protected Scene m_scene = null; | 49 | protected Scene m_scene = null; |
50 | protected IDialogModule m_dialogModule; | 50 | protected IDialogModule m_dialogModule; |
51 | 51 | ||
52 | public string Name { get { return "Object BuySell Module"; } } | 52 | public string Name { get { return "Object BuySell Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) {} | 55 | public void Initialise(IConfigSource source) {} |
56 | 56 | ||
@@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
78 | 78 | ||
79 | public void SubscribeToClientEvents(IClientAPI client) | 79 | public void SubscribeToClientEvents(IClientAPI client) |
80 | { | 80 | { |
81 | client.OnObjectSaleInfo += ObjectSaleInfo; | 81 | client.OnObjectSaleInfo += ObjectSaleInfo; |
82 | } | 82 | } |
83 | 83 | ||
84 | protected void ObjectSaleInfo( | 84 | protected void ObjectSaleInfo( |
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
99 | part.ParentGroup.HasGroupChanged = true; | 99 | part.ParentGroup.HasGroupChanged = true; |
100 | 100 | ||
101 | part.GetProperties(client); | 101 | part.GetProperties(client); |
102 | } | 102 | } |
103 | 103 | ||
104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | 104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) |
105 | { | 105 | { |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
228 | if (m_dialogModule != null) | 228 | if (m_dialogModule != null) |
229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | 229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); |
230 | return false; | 230 | return false; |
231 | } | 231 | } |
@@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
261 | } | 261 | } |
262 | 262 | ||
263 | return true; | 263 | return true; |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } \ No newline at end of file | 266 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index bc54997..573a22a 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); | 397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); |
398 | 398 | ||
399 | if (m_groupsModule == null) | 399 | if (m_groupsModule == null) |
400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); | 400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); |
401 | 401 | ||
402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); | 402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); |
403 | 403 | ||
404 | // This log line will be commented out when no longer required for debugging | 404 | // This log line will be commented out when no longer required for debugging |
405 | // if (m_moapModule == null) | 405 | // if (m_moapModule == null) |
406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); | 406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); |
407 | } | 407 | } |
408 | 408 | ||
409 | public void Close() | 409 | public void Close() |
@@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) | 1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) |
1909 | { | 1909 | { |
1910 | // m_log.DebugFormat( | 1910 | // m_log.DebugFormat( |
1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", | 1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", |
1912 | // agentID, primID, face); | 1912 | // agentID, primID, face); |
@@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1918 | if (null == part) | 1918 | if (null == part) |
1919 | return false; | 1919 | return false; |
1920 | 1920 | ||
1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); | 1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); |
1922 | 1922 | ||
1923 | // If there is no existing media entry then it can be controlled (in this context, created). | 1923 | // If there is no existing media entry then it can be controlled (in this context, created). |
1924 | if (null == me) | 1924 | if (null == me) |
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1929 | // agentID, primID, face, me.ControlPermissions); | 1929 | // agentID, primID, face, me.ControlPermissions); |
1930 | 1930 | ||
1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); | 1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) | 1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) |
1935 | { | 1935 | { |
@@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1952 | 1952 | ||
1953 | // m_log.DebugFormat( | 1953 | // m_log.DebugFormat( |
1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", | 1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", |
1955 | // agentID, primID, face, me.InteractPermissions); | 1955 | // agentID, primID, face, me.InteractPermissions); |
1956 | 1956 | ||
1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); | 1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) | 1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) |
1961 | { | 1961 | { |
1962 | // if (IsAdministrator(agentID)) | 1962 | // if (IsAdministrator(agentID)) |
1963 | // return true; | 1963 | // return true; |
1964 | 1964 | ||
1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) | 1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) |
1966 | return true; | 1966 | return true; |
@@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1969 | { | 1969 | { |
1970 | if (agentID == part.OwnerID) | 1970 | if (agentID == part.OwnerID) |
1971 | return true; | 1971 | return true; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) | 1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) |
1975 | { | 1975 | { |
1976 | if (IsGroupMember(part.GroupID, agentID, 0)) | 1976 | if (IsGroupMember(part.GroupID, agentID, 0)) |
1977 | return true; | 1977 | return true; |
1978 | } | 1978 | } |
1979 | 1979 | ||
1980 | return false; | 1980 | return false; |
1981 | } | 1981 | } |
1982 | } | 1982 | } |
1983 | } \ No newline at end of file | 1983 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index cb80111..25d73c2 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
814 | { | 814 | { |
815 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | 815 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); |
816 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); | 816 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); |
817 | } | 817 | } |
818 | 818 | ||
819 | private void StoreUndoState() | 819 | private void StoreUndoState() |
820 | { | 820 | { |
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9736b73..6bac555 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules | |||
425 | { | 425 | { |
426 | if (m_ready) | 426 | if (m_ready) |
427 | { | 427 | { |
428 | if(m_scene.GetRootAgentCount() > 0) | 428 | if (m_scene.GetRootAgentCount() > 0) |
429 | { | 429 | { |
430 | // Ask wind plugin to generate a LL wind array to be cached locally | 430 | // Ask wind plugin to generate a LL wind array to be cached locally |
431 | // Try not to update this too often, as it may involve array copies | 431 | // Try not to update this too often, as it may involve array copies |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 1d9c2bd..1bd1371 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; | 228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; |
229 | Color mapdotspot = Color.Gray; // Default color when prim color is white | 229 | Color mapdotspot = Color.Gray; // Default color when prim color is white |
230 | 230 | ||
231 | // Loop over prim in group | 231 | // Loop over prim in group |
232 | List<SceneObjectPart> partList = null; | 232 | List<SceneObjectPart> partList = null; |
233 | lock (mapdot.Children) | 233 | lock (mapdot.Children) |
234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); | 234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f036d85..fbc8a50 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
307 | lock (m_rootAgents) | 307 | lock (m_rootAgents) |
308 | { | 308 | { |
309 | m_rootAgents.Remove(AgentId); | 309 | m_rootAgents.Remove(AgentId); |
310 | if(m_rootAgents.Count == 0) | 310 | if (m_rootAgents.Count == 0) |
311 | StopThread(); | 311 | StopThread(); |
312 | } | 312 | } |
313 | } | 313 | } |