diff options
author | root | 2009-11-26 20:41:38 +0100 |
---|---|---|
committer | root | 2009-11-26 20:41:38 +0100 |
commit | 2c3f6aaa878b5458eeeab8544226ff53b7172f5a (patch) | |
tree | 48941505962693508016fafb479c2baaf1b3568f /OpenSim/Region/CoreModules | |
parent | First attempt at mult-sit on large single prims. (diff) | |
parent | Remove OS version crap from about dialog (diff) | |
download | opensim-SC_OLD-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.zip opensim-SC_OLD-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.gz opensim-SC_OLD-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.bz2 opensim-SC_OLD-2c3f6aaa878b5458eeeab8544226ff53b7172f5a.tar.xz |
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Region/CoreModules')
14 files changed, 249 insertions, 128 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index cd59bdb..e3e8718 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
49 | private int m_shoutdistance = 100; | 49 | private int m_shoutdistance = 100; |
50 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
51 | private List<Scene> m_scenes = new List<Scene>(); | 51 | private List<Scene> m_scenes = new List<Scene>(); |
52 | 52 | private string m_adminPrefix = ""; | |
53 | internal object m_syncy = new object(); | 53 | internal object m_syncy = new object(); |
54 | 54 | ||
55 | internal IConfig m_config; | 55 | internal IConfig m_config; |
@@ -57,25 +57,26 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
57 | #region ISharedRegionModule Members | 57 | #region ISharedRegionModule Members |
58 | public virtual void Initialise(IConfigSource config) | 58 | public virtual void Initialise(IConfigSource config) |
59 | { | 59 | { |
60 | |||
61 | m_config = config.Configs["Chat"]; | 60 | m_config = config.Configs["Chat"]; |
62 | 61 | ||
63 | if (null == m_config) | 62 | if (null == m_config) |
64 | { | 63 | { |
65 | m_log.Info("[CHAT]: no config found, plugin disabled"); | 64 | m_log.Info("[CHAT]: no config found, plugin disabled"); |
65 | m_enabled = false; | ||
66 | return; | 66 | return; |
67 | } | 67 | } |
68 | 68 | ||
69 | if (!m_config.GetBoolean("enabled", false)) | 69 | if (!m_config.GetBoolean("enabled", true)) |
70 | { | 70 | { |
71 | m_log.Info("[CHAT]: plugin disabled by configuration"); | 71 | m_log.Info("[CHAT]: plugin disabled by configuration"); |
72 | m_enabled = false; | ||
72 | return; | 73 | return; |
73 | } | 74 | } |
74 | m_enabled = true; | ||
75 | 75 | ||
76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); | 76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); |
77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); | 77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); |
78 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); | 78 | m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); |
79 | m_adminPrefix = config.Configs["Chat"].GetString("admin_prefix", ""); | ||
79 | } | 80 | } |
80 | 81 | ||
81 | public virtual void AddRegion(Scene scene) | 82 | public virtual void AddRegion(Scene scene) |
@@ -185,6 +186,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
185 | protected virtual void DeliverChatToAvatars(ChatSourceType sourceType, OSChatMessage c) | 186 | protected virtual void DeliverChatToAvatars(ChatSourceType sourceType, OSChatMessage c) |
186 | { | 187 | { |
187 | string fromName = c.From; | 188 | string fromName = c.From; |
189 | string fromNamePrefix = ""; | ||
188 | UUID fromID = UUID.Zero; | 190 | UUID fromID = UUID.Zero; |
189 | string message = c.Message; | 191 | string message = c.Message; |
190 | IScene scene = c.Scene; | 192 | IScene scene = c.Scene; |
@@ -207,7 +209,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
207 | fromPos = avatar.AbsolutePosition; | 209 | fromPos = avatar.AbsolutePosition; |
208 | fromName = avatar.Name; | 210 | fromName = avatar.Name; |
209 | fromID = c.Sender.AgentId; | 211 | fromID = c.Sender.AgentId; |
210 | 212 | if (avatar.GodLevel > 200) | |
213 | { | ||
214 | fromNamePrefix = m_adminPrefix; | ||
215 | } | ||
211 | break; | 216 | break; |
212 | 217 | ||
213 | case ChatSourceType.Object: | 218 | case ChatSourceType.Object: |
@@ -227,7 +232,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
227 | s.ForEachScenePresence( | 232 | s.ForEachScenePresence( |
228 | delegate(ScenePresence presence) | 233 | delegate(ScenePresence presence) |
229 | { | 234 | { |
230 | TrySendChatMessage(presence, fromPos, regionPos, fromID, fromName, c.Type, message, sourceType); | 235 | TrySendChatMessage(presence, fromPos, regionPos, fromID, fromNamePrefix+fromName, c.Type, message, sourceType); |
231 | } | 236 | } |
232 | ); | 237 | ); |
233 | } | 238 | } |
@@ -266,25 +271,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
266 | } | 271 | } |
267 | 272 | ||
268 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); | 273 | // m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType); |
269 | 274 | if (c.Scene != null) | |
270 | ((Scene)c.Scene).ForEachScenePresence( | 275 | { |
271 | delegate(ScenePresence presence) | 276 | ((Scene)c.Scene).ForEachScenePresence |
272 | { | 277 | ( |
273 | // ignore chat from child agents | 278 | delegate(ScenePresence presence) |
274 | if (presence.IsChildAgent) return; | 279 | { |
275 | 280 | // ignore chat from child agents | |
276 | IClientAPI client = presence.ControllingClient; | 281 | if (presence.IsChildAgent) return; |
277 | 282 | ||
278 | // don't forward SayOwner chat from objects to | 283 | IClientAPI client = presence.ControllingClient; |
279 | // non-owner agents | 284 | |
280 | if ((c.Type == ChatTypeEnum.Owner) && | 285 | // don't forward SayOwner chat from objects to |
281 | (null != c.SenderObject) && | 286 | // non-owner agents |
282 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) | 287 | if ((c.Type == ChatTypeEnum.Owner) && |
283 | return; | 288 | (null != c.SenderObject) && |
284 | 289 | (((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId)) | |
285 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, | 290 | return; |
286 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | 291 | |
287 | }); | 292 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, |
293 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | ||
294 | } | ||
295 | ); | ||
296 | } | ||
288 | } | 297 | } |
289 | 298 | ||
290 | 299 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 9e76d79..b778389 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -121,45 +121,51 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
121 | 121 | ||
122 | byte[] data; | 122 | byte[] data; |
123 | TarArchiveReader.TarEntryType entryType; | 123 | TarArchiveReader.TarEntryType entryType; |
124 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) | ||
125 | { | ||
126 | if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) | ||
127 | { | ||
128 | if (LoadAsset(filePath, data)) | ||
129 | successfulAssetRestores++; | ||
130 | else | ||
131 | failedAssetRestores++; | ||
132 | 124 | ||
133 | if ((successfulAssetRestores) % 50 == 0) | 125 | try |
134 | m_log.DebugFormat( | 126 | { |
135 | "[INVENTORY ARCHIVER]: Loaded {0} assets...", | 127 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) |
136 | successfulAssetRestores); | ||
137 | } | ||
138 | else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) | ||
139 | { | 128 | { |
140 | InventoryFolderBase foundFolder | 129 | if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) |
141 | = ReplicateArchivePathToUserInventory( | ||
142 | filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, | ||
143 | rootDestinationFolder, foldersCreated, nodesLoaded); | ||
144 | |||
145 | if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) | ||
146 | { | 130 | { |
147 | InventoryItemBase item = LoadItem(data, foundFolder); | 131 | if (LoadAsset(filePath, data)) |
148 | 132 | successfulAssetRestores++; | |
149 | if (item != null) | 133 | else |
134 | failedAssetRestores++; | ||
135 | |||
136 | if ((successfulAssetRestores) % 50 == 0) | ||
137 | m_log.DebugFormat( | ||
138 | "[INVENTORY ARCHIVER]: Loaded {0} assets...", | ||
139 | successfulAssetRestores); | ||
140 | } | ||
141 | else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) | ||
142 | { | ||
143 | InventoryFolderBase foundFolder | ||
144 | = ReplicateArchivePathToUserInventory( | ||
145 | filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, | ||
146 | rootDestinationFolder, foldersCreated, nodesLoaded); | ||
147 | |||
148 | if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) | ||
150 | { | 149 | { |
151 | successfulItemRestores++; | 150 | InventoryItemBase item = LoadItem(data, foundFolder); |
152 | 151 | ||
153 | // If we're loading an item directly into the given destination folder then we need to record | 152 | if (item != null) |
154 | // it separately from any loaded root folders | 153 | { |
155 | if (rootDestinationFolder == foundFolder) | 154 | successfulItemRestores++; |
156 | nodesLoaded.Add(item); | 155 | |
156 | // If we're loading an item directly into the given destination folder then we need to record | ||
157 | // it separately from any loaded root folders | ||
158 | if (rootDestinationFolder == foundFolder) | ||
159 | nodesLoaded.Add(item); | ||
160 | } | ||
157 | } | 161 | } |
158 | } | 162 | } |
159 | } | 163 | } |
160 | } | 164 | } |
161 | 165 | finally | |
162 | archive.Close(); | 166 | { |
167 | archive.Close(); | ||
168 | } | ||
163 | 169 | ||
164 | m_log.DebugFormat( | 170 | m_log.DebugFormat( |
165 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", | 171 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", |
@@ -342,9 +348,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
342 | 348 | ||
343 | UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager); | 349 | UUID ospResolvedId = OspResolver.ResolveOspa(item.CreatorId, m_scene.CommsManager); |
344 | if (UUID.Zero != ospResolvedId) | 350 | if (UUID.Zero != ospResolvedId) |
351 | { | ||
345 | item.CreatorIdAsUuid = ospResolvedId; | 352 | item.CreatorIdAsUuid = ospResolvedId; |
353 | |||
354 | // XXX: For now, don't preserve the OSPA in the creator id (which actually gets persisted to the | ||
355 | // database). Instead, replace with the UUID that we found. | ||
356 | item.CreatorId = ospResolvedId.ToString(); | ||
357 | } | ||
346 | else | 358 | else |
359 | { | ||
347 | item.CreatorIdAsUuid = m_userInfo.UserProfile.ID; | 360 | item.CreatorIdAsUuid = m_userInfo.UserProfile.ID; |
361 | } | ||
348 | 362 | ||
349 | item.Owner = m_userInfo.UserProfile.ID; | 363 | item.Owner = m_userInfo.UserProfile.ID; |
350 | 364 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 6e11f36..c85d974 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -117,19 +117,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
117 | } | 117 | } |
118 | 118 | ||
119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | 119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) |
120 | { | 120 | { |
121 | // We're almost done. Just need to write out the control file now | ||
122 | m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); | ||
123 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
124 | |||
125 | Exception reportedException = null; | 121 | Exception reportedException = null; |
126 | bool succeeded = true; | 122 | bool succeeded = true; |
127 | 123 | ||
128 | try | 124 | try |
129 | { | 125 | { |
126 | // We're almost done. Just need to write out the control file now | ||
127 | m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); | ||
128 | m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); | ||
129 | |||
130 | m_archiveWriter.Close(); | 130 | m_archiveWriter.Close(); |
131 | } | 131 | } |
132 | catch (IOException e) | 132 | catch (Exception e) |
133 | { | 133 | { |
134 | m_saveStream.Close(); | 134 | m_saveStream.Close(); |
135 | reportedException = e; | 135 | reportedException = e; |
@@ -261,39 +261,47 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
261 | //inventoryItem = m_userInfo.RootFolder.FindItemByPath(m_invPath); | 261 | //inventoryItem = m_userInfo.RootFolder.FindItemByPath(m_invPath); |
262 | } | 262 | } |
263 | 263 | ||
264 | m_archiveWriter = new TarArchiveWriter(m_saveStream); | 264 | if (null == inventoryFolder && null == inventoryItem) |
265 | |||
266 | if (inventoryFolder != null) | ||
267 | { | ||
268 | m_log.DebugFormat( | ||
269 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", | ||
270 | inventoryFolder.Name, inventoryFolder.ID, m_invPath); | ||
271 | |||
272 | //recurse through all dirs getting dirs and files | ||
273 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); | ||
274 | } | ||
275 | else if (inventoryItem != null) | ||
276 | { | ||
277 | m_log.DebugFormat( | ||
278 | "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", | ||
279 | inventoryItem.Name, inventoryItem.ID, m_invPath); | ||
280 | |||
281 | SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); | ||
282 | } | ||
283 | else | ||
284 | { | 265 | { |
285 | // We couldn't find the path indicated | 266 | // We couldn't find the path indicated |
286 | m_saveStream.Close(); | ||
287 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); | 267 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); |
288 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); | 268 | m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); |
289 | m_module.TriggerInventoryArchiveSaved( | 269 | m_module.TriggerInventoryArchiveSaved( |
290 | m_id, false, m_userInfo, m_invPath, m_saveStream, | 270 | m_id, false, m_userInfo, m_invPath, m_saveStream, |
291 | new Exception(errorMessage)); | 271 | new Exception(errorMessage)); |
292 | return; | 272 | return; |
293 | } | 273 | } |
274 | |||
275 | m_archiveWriter = new TarArchiveWriter(m_saveStream); | ||
294 | 276 | ||
295 | // Don't put all this profile information into the archive right now. | 277 | try |
296 | //SaveUsers(); | 278 | { |
279 | if (inventoryFolder != null) | ||
280 | { | ||
281 | m_log.DebugFormat( | ||
282 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", | ||
283 | inventoryFolder.Name, inventoryFolder.ID, m_invPath); | ||
284 | |||
285 | //recurse through all dirs getting dirs and files | ||
286 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); | ||
287 | } | ||
288 | else if (inventoryItem != null) | ||
289 | { | ||
290 | m_log.DebugFormat( | ||
291 | "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", | ||
292 | inventoryItem.Name, inventoryItem.ID, m_invPath); | ||
293 | |||
294 | SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); | ||
295 | } | ||
296 | |||
297 | // Don't put all this profile information into the archive right now. | ||
298 | //SaveUsers(); | ||
299 | } | ||
300 | catch (Exception) | ||
301 | { | ||
302 | m_archiveWriter.Close(); | ||
303 | throw; | ||
304 | } | ||
297 | 305 | ||
298 | new AssetsRequest( | 306 | new AssetsRequest( |
299 | new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys, | 307 | new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys, |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 1228eb1..ecd60bd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -92,12 +92,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
92 | scene.AddCommand( | 92 | scene.AddCommand( |
93 | this, "load iar", | 93 | this, "load iar", |
94 | "load iar <first> <last> <inventory path> <password> [<archive path>]", | 94 | "load iar <first> <last> <inventory path> <password> [<archive path>]", |
95 | "Load user inventory archive. EXPERIMENTAL", HandleLoadInvConsoleCommand); | 95 | "Load user inventory archive.", HandleLoadInvConsoleCommand); |
96 | 96 | ||
97 | scene.AddCommand( | 97 | scene.AddCommand( |
98 | this, "save iar", | 98 | this, "save iar", |
99 | "save iar <first> <last> <inventory path> <password> [<archive path>]", | 99 | "save iar <first> <last> <inventory path> <password> [<archive path>]", |
100 | "Save user inventory archive. EXPERIMENTAL", HandleSaveInvConsoleCommand); | 100 | "Save user inventory archive.", HandleSaveInvConsoleCommand); |
101 | 101 | ||
102 | m_aScene = scene; | 102 | m_aScene = scene; |
103 | } | 103 | } |
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
280 | string savePath = (cmdparams.Length > 6 ? cmdparams[6] : DEFAULT_INV_BACKUP_FILENAME); | 280 | string savePath = (cmdparams.Length > 6 ? cmdparams[6] : DEFAULT_INV_BACKUP_FILENAME); |
281 | 281 | ||
282 | m_log.InfoFormat( | 282 | m_log.InfoFormat( |
283 | "[INVENTORY ARCHIVER]: Saving archive {0} from inventory path {1} for {2} {3}", | 283 | "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", |
284 | savePath, invPath, firstName, lastName); | 284 | savePath, invPath, firstName, lastName); |
285 | 285 | ||
286 | Guid id = Guid.NewGuid(); | 286 | Guid id = Guid.NewGuid(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 7927352..e4dad18 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -259,9 +259,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
259 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, userInfo.UserProfile.ID, item1Name); | 259 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, userInfo.UserProfile.ID, item1Name); |
260 | 260 | ||
261 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); | 261 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1"); |
262 | |||
263 | // We have to disable this check since loaded items that did find users via OSPA resolution are now only storing the | ||
264 | // UUID, not the OSPA itself. | ||
265 | // Assert.That( | ||
266 | // foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), | ||
267 | // "Loaded item non-uuid creator doesn't match original"); | ||
262 | Assert.That( | 268 | Assert.That( |
263 | foundItem1.CreatorId, Is.EqualTo(item1.CreatorId), | 269 | foundItem1.CreatorId, Is.EqualTo(userItemCreatorUuid.ToString()), |
264 | "Loaded item non-uuid creator doesn't match original"); | 270 | "Loaded item non-uuid creator doesn't match original"); |
271 | |||
265 | Assert.That( | 272 | Assert.That( |
266 | foundItem1.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid), | 273 | foundItem1.CreatorIdAsUuid, Is.EqualTo(userItemCreatorUuid), |
267 | "Loaded item uuid creator doesn't match original"); | 274 | "Loaded item uuid creator doesn't match original"); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index d9a021f..b60b32b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -389,7 +389,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
389 | { | 389 | { |
390 | // Check if this is ours to handle | 390 | // Check if this is ours to handle |
391 | // | 391 | // |
392 | m_log.Info("OnFridInstantMessage"); | 392 | //m_log.Info("OnFridInstantMessage"); |
393 | if (msg.dialog != (byte) InstantMessageDialog.InventoryOffered) | 393 | if (msg.dialog != (byte) InstantMessageDialog.InventoryOffered) |
394 | return; | 394 | return; |
395 | 395 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs index ee809bd..d9f6e33 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs | |||
@@ -263,8 +263,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
263 | { | 263 | { |
264 | // We need to make a local copy of the object | 264 | // We need to make a local copy of the object |
265 | ISceneObject sogClone = sog.CloneForNewScene(); | 265 | ISceneObject sogClone = sog.CloneForNewScene(); |
266 | sogClone.SetState(sog.GetStateSnapshot(), | 266 | sogClone.SetState(sog.GetStateSnapshot(), s); |
267 | s.RegionInfo.RegionID); | ||
268 | return s.IncomingCreateObject(sogClone); | 267 | return s.IncomingCreateObject(sogClone); |
269 | } | 268 | } |
270 | else | 269 | else |
@@ -294,15 +293,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
294 | 293 | ||
295 | #region Misc | 294 | #region Misc |
296 | 295 | ||
297 | public UUID GetRegionID(ulong regionhandle) | 296 | public Scene GetScene(ulong regionhandle) |
298 | { | 297 | { |
299 | foreach (Scene s in m_sceneList) | 298 | foreach (Scene s in m_sceneList) |
300 | { | 299 | { |
301 | if (s.RegionInfo.RegionHandle == regionhandle) | 300 | if (s.RegionInfo.RegionHandle == regionhandle) |
302 | return s.RegionInfo.RegionID; | 301 | return s; |
303 | } | 302 | } |
304 | // ? weird. should not happen | 303 | // ? weird. should not happen |
305 | return m_sceneList[0].RegionInfo.RegionID; | 304 | return m_sceneList[0]; |
306 | } | 305 | } |
307 | 306 | ||
308 | public bool IsLocalRegion(ulong regionhandle) | 307 | public bool IsLocalRegion(ulong regionhandle) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index 696225c..710e3ca 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -641,7 +641,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
641 | if (args["extra"] != null) | 641 | if (args["extra"] != null) |
642 | extraStr = args["extra"].AsString(); | 642 | extraStr = args["extra"].AsString(); |
643 | 643 | ||
644 | UUID regionID = m_localBackend.GetRegionID(regionhandle); | 644 | IScene s = m_localBackend.GetScene(regionhandle); |
645 | SceneObjectGroup sog = null; | 645 | SceneObjectGroup sog = null; |
646 | try | 646 | try |
647 | { | 647 | { |
@@ -663,7 +663,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
663 | { | 663 | { |
664 | try | 664 | try |
665 | { | 665 | { |
666 | sog.SetState(stateXmlStr, regionID); | 666 | sog.SetState(stateXmlStr, s); |
667 | } | 667 | } |
668 | catch (Exception ex) | 668 | catch (Exception ex) |
669 | { | 669 | { |
@@ -695,8 +695,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
695 | if (args["itemid"] != null) | 695 | if (args["itemid"] != null) |
696 | itemID = args["itemid"].AsUUID(); | 696 | itemID = args["itemid"].AsUUID(); |
697 | 697 | ||
698 | //UUID regionID = m_localBackend.GetRegionID(regionhandle); | ||
699 | |||
700 | // This is the meaning of PUT object | 698 | // This is the meaning of PUT object |
701 | bool result = m_localBackend.SendCreateObject(regionhandle, userID, itemID); | 699 | bool result = m_localBackend.SendCreateObject(regionhandle, userID, itemID); |
702 | 700 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 70a225e..114dd13 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -103,14 +103,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
103 | List<string> serialisedSceneObjects = new List<string>(); | 103 | List<string> serialisedSceneObjects = new List<string>(); |
104 | List<string> serialisedParcels = new List<string>(); | 104 | List<string> serialisedParcels = new List<string>(); |
105 | string filePath = "NONE"; | 105 | string filePath = "NONE"; |
106 | |||
107 | TarArchiveReader archive = new TarArchiveReader(m_loadStream); | ||
108 | byte[] data; | ||
109 | TarArchiveReader.TarEntryType entryType; | ||
106 | 110 | ||
107 | try | 111 | try |
108 | { | 112 | { |
109 | TarArchiveReader archive = new TarArchiveReader(m_loadStream); | ||
110 | |||
111 | byte[] data; | ||
112 | TarArchiveReader.TarEntryType entryType; | ||
113 | |||
114 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) | 113 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) |
115 | { | 114 | { |
116 | //m_log.DebugFormat( | 115 | //m_log.DebugFormat( |
@@ -152,8 +151,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
152 | } | 151 | } |
153 | 152 | ||
154 | //m_log.Debug("[ARCHIVER]: Reached end of archive"); | 153 | //m_log.Debug("[ARCHIVER]: Reached end of archive"); |
155 | |||
156 | archive.Close(); | ||
157 | } | 154 | } |
158 | catch (Exception e) | 155 | catch (Exception e) |
159 | { | 156 | { |
@@ -163,6 +160,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
163 | m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); | 160 | m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); |
164 | return; | 161 | return; |
165 | } | 162 | } |
163 | finally | ||
164 | { | ||
165 | archive.Close(); | ||
166 | } | ||
166 | 167 | ||
167 | m_log.InfoFormat("[ARCHIVER]: Restored {0} assets", successfulAssetRestores); | 168 | m_log.InfoFormat("[ARCHIVER]: Restored {0} assets", successfulAssetRestores); |
168 | 169 | ||
@@ -246,21 +247,20 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
246 | // Fix ownership/creator of inventory items | 247 | // Fix ownership/creator of inventory items |
247 | // Not doing so results in inventory items | 248 | // Not doing so results in inventory items |
248 | // being no copy/no mod for everyone | 249 | // being no copy/no mod for everyone |
249 | lock (part.TaskInventory) | 250 | part.TaskInventory.LockItemsForRead(true); |
251 | TaskInventoryDictionary inv = part.TaskInventory; | ||
252 | foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) | ||
250 | { | 253 | { |
251 | TaskInventoryDictionary inv = part.TaskInventory; | 254 | if (!ResolveUserUuid(kvp.Value.OwnerID)) |
252 | foreach (KeyValuePair<UUID, TaskInventoryItem> kvp in inv) | 255 | { |
256 | kvp.Value.OwnerID = masterAvatarId; | ||
257 | } | ||
258 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | ||
253 | { | 259 | { |
254 | if (!ResolveUserUuid(kvp.Value.OwnerID)) | 260 | kvp.Value.CreatorID = masterAvatarId; |
255 | { | ||
256 | kvp.Value.OwnerID = masterAvatarId; | ||
257 | } | ||
258 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | ||
259 | { | ||
260 | kvp.Value.CreatorID = masterAvatarId; | ||
261 | } | ||
262 | } | 261 | } |
263 | } | 262 | } |
263 | part.TaskInventory.LockItemsForRead(false); | ||
264 | } | 264 | } |
265 | 265 | ||
266 | if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) | 266 | if (m_scene.AddRestoredSceneObject(sceneObject, true, false)) |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index f039be8..75c4557 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -80,6 +80,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
80 | protected internal void ReceivedAllAssets( | 80 | protected internal void ReceivedAllAssets( |
81 | ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | 81 | ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) |
82 | { | 82 | { |
83 | try | ||
84 | { | ||
85 | Save(assetsFoundUuids, assetsNotFoundUuids); | ||
86 | } | ||
87 | finally | ||
88 | { | ||
89 | m_archiveWriter.Close(); | ||
90 | } | ||
91 | |||
92 | m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_scene.RegionInfo.RegionName); | ||
93 | |||
94 | m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); | ||
95 | } | ||
96 | |||
97 | protected internal void Save(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | ||
98 | { | ||
83 | foreach (UUID uuid in assetsNotFoundUuids) | 99 | foreach (UUID uuid in assetsNotFoundUuids) |
84 | { | 100 | { |
85 | m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); | 101 | m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); |
@@ -143,12 +159,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
143 | } | 159 | } |
144 | 160 | ||
145 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); | 161 | m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); |
146 | |||
147 | m_archiveWriter.Close(); | ||
148 | |||
149 | m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_scene.RegionInfo.RegionName); | ||
150 | |||
151 | m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); | ||
152 | } | 162 | } |
153 | 163 | ||
154 | /// <summary> | 164 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 9e4fbbe..71bfe57 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -56,6 +56,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
56 | /// <summary> | 56 | /// <summary> |
57 | /// Constructor | 57 | /// Constructor |
58 | /// </summary> | 58 | /// </summary> |
59 | /// <param name="scene"></param> | ||
60 | /// <param name="savePath">The path to which to save data.</param> | ||
61 | /// <param name="requestId">The id associated with this request</param> | ||
62 | /// <exception cref="System.IO.IOException"> | ||
63 | /// If there was a problem opening a stream for the file specified by the savePath | ||
64 | /// </exception> | ||
59 | public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) | 65 | public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) |
60 | { | 66 | { |
61 | m_scene = scene; | 67 | m_scene = scene; |
@@ -87,6 +93,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
87 | List<EntityBase> entities = m_scene.GetEntities(); | 93 | List<EntityBase> entities = m_scene.GetEntities(); |
88 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 94 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
89 | 95 | ||
96 | /* | ||
97 | foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) | ||
98 | { | ||
99 | if (name == lo.LandData.Name) | ||
100 | { | ||
101 | // This is the parcel we want | ||
102 | } | ||
103 | } | ||
104 | */ | ||
105 | |||
90 | // Filter entities so that we only have scene objects. | 106 | // Filter entities so that we only have scene objects. |
91 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods | 107 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods |
92 | // end up having to do this | 108 | // end up having to do this |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 8d4f91b..27763bb 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -26,9 +26,11 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.IO; | 30 | using System.IO; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
33 | using NDesk.Options; | ||
32 | using Nini.Config; | 34 | using Nini.Config; |
33 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
@@ -45,6 +47,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
45 | 47 | ||
46 | private Scene m_scene; | 48 | private Scene m_scene; |
47 | 49 | ||
50 | /// <value> | ||
51 | /// The file used to load and save an opensimulator archive if no filename has been specified | ||
52 | /// </value> | ||
53 | protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; | ||
54 | |||
48 | public string Name | 55 | public string Name |
49 | { | 56 | { |
50 | get { return "RegionArchiverModule"; } | 57 | get { return "RegionArchiverModule"; } |
@@ -80,6 +87,48 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
80 | { | 87 | { |
81 | } | 88 | } |
82 | 89 | ||
90 | /// <summary> | ||
91 | /// Load a whole region from an opensimulator archive. | ||
92 | /// </summary> | ||
93 | /// <param name="cmdparams"></param> | ||
94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | ||
95 | { | ||
96 | bool mergeOar = false; | ||
97 | |||
98 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); | ||
99 | List<string> mainParams = options.Parse(cmdparams); | ||
100 | |||
101 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); | ||
102 | // | ||
103 | // foreach (string param in mainParams) | ||
104 | // m_log.DebugFormat("GOT PARAM [{0}]", param); | ||
105 | |||
106 | if (mainParams.Count > 2) | ||
107 | { | ||
108 | DearchiveRegion(mainParams[2], mergeOar, Guid.Empty); | ||
109 | } | ||
110 | else | ||
111 | { | ||
112 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | /// <summary> | ||
117 | /// Save a region to a file, including all the assets needed to restore it. | ||
118 | /// </summary> | ||
119 | /// <param name="cmdparams"></param> | ||
120 | public void HandleSaveOarConsoleCommand(string module, string[] cmdparams) | ||
121 | { | ||
122 | if (cmdparams.Length > 2) | ||
123 | { | ||
124 | ArchiveRegion(cmdparams[2]); | ||
125 | } | ||
126 | else | ||
127 | { | ||
128 | ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | ||
129 | } | ||
130 | } | ||
131 | |||
83 | public void ArchiveRegion(string savePath) | 132 | public void ArchiveRegion(string savePath) |
84 | { | 133 | { |
85 | ArchiveRegion(savePath, Guid.Empty); | 134 | ArchiveRegion(savePath, Guid.Empty); |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 4ed23bb..81024db 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
105 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); | 105 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
106 | obj.LandData.Name = "NO LAND"; | 106 | obj.LandData.Name = "NO LAND"; |
107 | return obj; | 107 | return obj; |
108 | } | 108 | } |
109 | 109 | ||
110 | public List<ILandObject> AllParcels() | 110 | public List<ILandObject> AllParcels() |
111 | { | 111 | { |
@@ -154,6 +154,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
154 | m_landManagementModule.UpdateLandObject(localID, data); | 154 | m_landManagementModule.UpdateLandObject(localID, data); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | |||
157 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 158 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
158 | { | 159 | { |
159 | if (m_landManagementModule != null) | 160 | if (m_landManagementModule != null) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 968f46a..9a2ef50 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -67,7 +67,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
67 | private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; | 67 | private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; |
68 | #pragma warning restore 0429 | 68 | #pragma warning restore 0429 |
69 | 69 | ||
70 | /// <value> | ||
71 | /// Local land ids at specified region co-ordinates (region size / 4) | ||
72 | /// </value> | ||
70 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 73 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
74 | |||
75 | /// <value> | ||
76 | /// Land objects keyed by local id | ||
77 | /// </value> | ||
71 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 78 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
72 | 79 | ||
73 | private bool m_landPrimCountTainted; | 80 | private bool m_landPrimCountTainted; |
@@ -570,6 +577,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
570 | 577 | ||
571 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) | 578 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) |
572 | return null; | 579 | return null; |
580 | |||
573 | try | 581 | try |
574 | { | 582 | { |
575 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 583 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -584,6 +592,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
584 | { | 592 | { |
585 | return null; | 593 | return null; |
586 | } | 594 | } |
595 | |||
587 | lock (m_landList) | 596 | lock (m_landList) |
588 | { | 597 | { |
589 | // Corner case. If an autoreturn happens during sim startup | 598 | // Corner case. If an autoreturn happens during sim startup |
@@ -603,6 +612,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
603 | // they happen every time at border crossings | 612 | // they happen every time at border crossings |
604 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 613 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
605 | } | 614 | } |
615 | |||
606 | lock (m_landIDList) | 616 | lock (m_landIDList) |
607 | { | 617 | { |
608 | try | 618 | try |
@@ -617,7 +627,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
617 | return null; | 627 | return null; |
618 | } | 628 | } |
619 | } | 629 | } |
620 | } | 630 | } |
621 | 631 | ||
622 | #endregion | 632 | #endregion |
623 | 633 | ||