diff options
author | Melanie | 2012-11-03 15:38:47 +0000 |
---|---|---|
committer | Melanie | 2012-11-03 15:38:47 +0000 |
commit | d0473b73da024c67cb1eb4a420e5ce6de59c5da4 (patch) | |
tree | 65ddc795b413c661f20f03bbe434e0194a8af6d5 /OpenSim | |
parent | Merge branch 'master' into careminster (diff) | |
parent | HG: flip all configs to HG2.0. PLEASE CHECK YOUR EXISTING HG CONFIGS AGAINST ... (diff) | |
download | opensim-SC-d0473b73da024c67cb1eb4a420e5ce6de59c5da4.zip opensim-SC-d0473b73da024c67cb1eb4a420e5ce6de59c5da4.tar.gz opensim-SC-d0473b73da024c67cb1eb4a420e5ce6de59c5da4.tar.bz2 opensim-SC-d0473b73da024c67cb1eb4a420e5ce6de59c5da4.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim')
8 files changed, 73 insertions, 50 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 0aee0d4..b16c37a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -259,8 +259,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
259 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) | 259 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) |
260 | { | 260 | { |
261 | // this user is going to another grid | 261 | // this user is going to another grid |
262 | // check if HyperGrid teleport is allowed, based on user level | 262 | // for local users, check if HyperGrid teleport is allowed, based on user level |
263 | if (sp.UserLevel < m_levelHGTeleport) | 263 | if (Scene.UserManagementModule.IsLocalGridUser(sp.UUID) && sp.UserLevel < m_levelHGTeleport) |
264 | { | 264 | { |
265 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel."); | 265 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel."); |
266 | reason = "Hypergrid teleport not allowed"; | 266 | reason = "Hypergrid teleport not allowed"; |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 80257bd..6bb758e 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
92 | m_HomeURI = thisModuleConfig.GetString("HomeURI", m_HomeURI); | 92 | m_HomeURI = thisModuleConfig.GetString("HomeURI", m_HomeURI); |
93 | m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); | 93 | m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); |
94 | m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty); | 94 | m_ThisGatekeeper = thisModuleConfig.GetString("Gatekeeper", string.Empty); |
95 | m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", false); | 95 | m_RestrictInventoryAccessAbroad = thisModuleConfig.GetBoolean("RestrictInventoryAccessAbroad", true); |
96 | } | 96 | } |
97 | else | 97 | else |
98 | m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); | 98 | m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); |
@@ -351,6 +351,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
351 | 351 | ||
352 | private void ProcessInventoryForArriving(IClientAPI client) | 352 | private void ProcessInventoryForArriving(IClientAPI client) |
353 | { | 353 | { |
354 | // No-op for now, but we may need to do something for freign users inventory | ||
354 | } | 355 | } |
355 | 356 | ||
356 | // | 357 | // |
@@ -397,6 +398,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
397 | 398 | ||
398 | private void ProcessInventoryForLeaving(IClientAPI client) | 399 | private void ProcessInventoryForLeaving(IClientAPI client) |
399 | { | 400 | { |
401 | // No-op for now | ||
400 | } | 402 | } |
401 | 403 | ||
402 | #endregion | 404 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e2be79a..2c18397 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -532,7 +532,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
532 | { | 532 | { |
533 | if (PhysicsActor != null) | 533 | if (PhysicsActor != null) |
534 | { | 534 | { |
535 | m_velocity = PhysicsActor.TargetVelocity; | 535 | m_velocity = PhysicsActor.Velocity; |
536 | 536 | ||
537 | // m_log.DebugFormat( | 537 | // m_log.DebugFormat( |
538 | // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", | 538 | // "[SCENE PRESENCE]: Set velocity {0} for {1} in {2} via getting Velocity!", |
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
547 | { | 547 | { |
548 | try | 548 | try |
549 | { | 549 | { |
550 | PhysicsActor.Velocity = value; | 550 | PhysicsActor.TargetVelocity = value; |
551 | } | 551 | } |
552 | catch (Exception e) | 552 | catch (Exception e) |
553 | { | 553 | { |
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs index 4123f49..ff45d94 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs | |||
@@ -67,10 +67,25 @@ namespace OpenSim.Server.Handlers.Asset | |||
67 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); | 67 | throw new Exception(String.Format("Failed to load AssetService from {0}; config is {1}", assetService, m_ConfigName)); |
68 | 68 | ||
69 | bool allowDelete = serverConfig.GetBoolean("AllowRemoteDelete", false); | 69 | bool allowDelete = serverConfig.GetBoolean("AllowRemoteDelete", false); |
70 | bool allowDeleteAllTypes = serverConfig.GetBoolean("AllowRemoteDeleteAllTypes", false); | ||
71 | |||
72 | AllowedRemoteDeleteTypes allowedRemoteDeleteTypes; | ||
73 | |||
74 | if (!allowDelete) | ||
75 | { | ||
76 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.None; | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | if (allowDeleteAllTypes) | ||
81 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.All; | ||
82 | else | ||
83 | allowedRemoteDeleteTypes = AllowedRemoteDeleteTypes.MapTile; | ||
84 | } | ||
70 | 85 | ||
71 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); | 86 | server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); |
72 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); | 87 | server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); |
73 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, allowDelete)); | 88 | server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService, allowedRemoteDeleteTypes)); |
74 | 89 | ||
75 | MainConsole.Instance.Commands.AddCommand("Assets", false, | 90 | MainConsole.Instance.Commands.AddCommand("Assets", false, |
76 | "show asset", | 91 | "show asset", |
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs index 0cfe5b1..986394b 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs | |||
@@ -42,18 +42,32 @@ using OpenSim.Framework.Servers.HttpServer; | |||
42 | 42 | ||
43 | namespace OpenSim.Server.Handlers.Asset | 43 | namespace OpenSim.Server.Handlers.Asset |
44 | { | 44 | { |
45 | /// <summary> | ||
46 | /// Remote deletes allowed. | ||
47 | /// </summary> | ||
48 | public enum AllowedRemoteDeleteTypes | ||
49 | { | ||
50 | None, | ||
51 | MapTile, | ||
52 | All | ||
53 | } | ||
54 | |||
45 | public class AssetServerDeleteHandler : BaseStreamHandler | 55 | public class AssetServerDeleteHandler : BaseStreamHandler |
46 | { | 56 | { |
47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 57 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 58 | ||
49 | private IAssetService m_AssetService; | 59 | private IAssetService m_AssetService; |
50 | protected bool m_allowDelete; | ||
51 | 60 | ||
52 | public AssetServerDeleteHandler(IAssetService service, bool allowDelete) : | 61 | /// <summary> |
62 | /// Asset types that can be deleted remotely. | ||
63 | /// </summary> | ||
64 | private AllowedRemoteDeleteTypes m_allowedTypes; | ||
65 | |||
66 | public AssetServerDeleteHandler(IAssetService service, AllowedRemoteDeleteTypes allowedTypes) : | ||
53 | base("DELETE", "/assets") | 67 | base("DELETE", "/assets") |
54 | { | 68 | { |
55 | m_AssetService = service; | 69 | m_AssetService = service; |
56 | m_allowDelete = allowDelete; | 70 | m_allowedTypes = allowedTypes; |
57 | } | 71 | } |
58 | 72 | ||
59 | public override byte[] Handle(string path, Stream request, | 73 | public override byte[] Handle(string path, Stream request, |
@@ -63,13 +77,32 @@ namespace OpenSim.Server.Handlers.Asset | |||
63 | 77 | ||
64 | string[] p = SplitParams(path); | 78 | string[] p = SplitParams(path); |
65 | 79 | ||
66 | if (p.Length > 0 && m_allowDelete) | 80 | if (p.Length > 0) |
67 | { | 81 | { |
68 | result = m_AssetService.Delete(p[0]); | 82 | if (m_allowedTypes != AllowedRemoteDeleteTypes.None) |
83 | { | ||
84 | string assetID = p[0]; | ||
85 | |||
86 | AssetBase asset = m_AssetService.Get(assetID); | ||
87 | if (asset != null) | ||
88 | { | ||
89 | if (m_allowedTypes == AllowedRemoteDeleteTypes.All | ||
90 | || (int)(asset.Flags & AssetFlags.Maptile) != 0) | ||
91 | { | ||
92 | result = m_AssetService.Delete(assetID); | ||
93 | } | ||
94 | else | ||
95 | { | ||
96 | m_log.DebugFormat( | ||
97 | "[ASSET SERVER DELETE HANDLER]: Request to delete asset {0}, but type is {1} and allowed remote delete types are {2}", | ||
98 | assetID, (AssetFlags)asset.Flags, m_allowedTypes); | ||
99 | } | ||
100 | } | ||
101 | } | ||
69 | } | 102 | } |
70 | 103 | ||
71 | XmlSerializer xs = new XmlSerializer(typeof(bool)); | 104 | XmlSerializer xs = new XmlSerializer(typeof(bool)); |
72 | return ServerUtils.SerializeResult(xs, result); | 105 | return ServerUtils.SerializeResult(xs, result); |
73 | } | 106 | } |
74 | } | 107 | } |
75 | } | 108 | } \ No newline at end of file |
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 96b430d..f1bffa4 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Services.AssetService | |||
70 | 70 | ||
71 | if (assetLoaderEnabled) | 71 | if (assetLoaderEnabled) |
72 | { | 72 | { |
73 | m_log.DebugFormat("[ASSET]: Loading default asset set from {0}", loaderArgs); | 73 | m_log.DebugFormat("[ASSET SERVICE]: Loading default asset set from {0}", loaderArgs); |
74 | 74 | ||
75 | m_AssetLoader.ForEachDefaultXmlAsset( | 75 | m_AssetLoader.ForEachDefaultXmlAsset( |
76 | loaderArgs, | 76 | loaderArgs, |
@@ -200,20 +200,7 @@ namespace OpenSim.Services.AssetService | |||
200 | if (!UUID.TryParse(id, out assetID)) | 200 | if (!UUID.TryParse(id, out assetID)) |
201 | return false; | 201 | return false; |
202 | 202 | ||
203 | AssetBase asset = m_Database.GetAsset(assetID); | 203 | return m_Database.Delete(id); |
204 | if (asset == null) | ||
205 | return false; | ||
206 | |||
207 | if ((int)(asset.Flags & AssetFlags.Maptile) != 0) | ||
208 | { | ||
209 | return m_Database.Delete(id); | ||
210 | } | ||
211 | else | ||
212 | { | ||
213 | m_log.DebugFormat("[ASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id); | ||
214 | } | ||
215 | |||
216 | return false; | ||
217 | } | 204 | } |
218 | } | 205 | } |
219 | } \ No newline at end of file | 206 | } \ No newline at end of file |
diff --git a/OpenSim/Services/AssetService/XAssetService.cs b/OpenSim/Services/AssetService/XAssetService.cs index e62bcb5..a1d10ed 100644 --- a/OpenSim/Services/AssetService/XAssetService.cs +++ b/OpenSim/Services/AssetService/XAssetService.cs | |||
@@ -194,21 +194,7 @@ namespace OpenSim.Services.AssetService | |||
194 | if (!UUID.TryParse(id, out assetID)) | 194 | if (!UUID.TryParse(id, out assetID)) |
195 | return false; | 195 | return false; |
196 | 196 | ||
197 | AssetBase asset = m_Database.GetAsset(assetID); | 197 | return m_Database.Delete(id); |
198 | if (asset == null) | ||
199 | return false; | ||
200 | |||
201 | if ((int)(asset.Flags & AssetFlags.Maptile) != 0) | ||
202 | { | ||
203 | return m_Database.Delete(id); | ||
204 | } | ||
205 | else | ||
206 | { | ||
207 | m_log.DebugFormat("[XASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id); | ||
208 | } | ||
209 | |||
210 | return false; | ||
211 | } | 198 | } |
212 | } | 199 | } |
213 | } | 200 | } \ No newline at end of file |
214 | |||
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 556a0da..677bd7b 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Services.HypergridService | |||
71 | m_ConfigName = configName; | 71 | m_ConfigName = configName; |
72 | 72 | ||
73 | if (m_Database == null) | 73 | if (m_Database == null) |
74 | m_log.WarnFormat("[XXX]: m_Database is null!"); | 74 | m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: m_Database is null!"); |
75 | 75 | ||
76 | // | 76 | // |
77 | // Try reading the [InventoryService] section, if it exists | 77 | // Try reading the [InventoryService] section, if it exists |
@@ -301,7 +301,7 @@ namespace OpenSim.Services.HypergridService | |||
301 | 301 | ||
302 | public override bool AddFolder(InventoryFolderBase folder) | 302 | public override bool AddFolder(InventoryFolderBase folder) |
303 | { | 303 | { |
304 | m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder {0} {1}", folder.Name, folder.ParentID); | 304 | //m_log.WarnFormat("[HG SUITCASE INVENTORY SERVICE]: AddFolder {0} {1}", folder.Name, folder.ParentID); |
305 | // Let's do a bit of sanity checking, more than the base service does | 305 | // Let's do a bit of sanity checking, more than the base service does |
306 | // make sure the given folder's parent folder exists under the suitcase tree of this user | 306 | // make sure the given folder's parent folder exists under the suitcase tree of this user |
307 | 307 | ||
@@ -323,7 +323,7 @@ namespace OpenSim.Services.HypergridService | |||
323 | 323 | ||
324 | public override bool UpdateFolder(InventoryFolderBase folder) | 324 | public override bool UpdateFolder(InventoryFolderBase folder) |
325 | { | 325 | { |
326 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version); | 326 | //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: Update folder {0}, version {1}", folder.ID, folder.Version); |
327 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) | 327 | if (!IsWithinSuitcaseTree(folder.Owner, folder.ID)) |
328 | { | 328 | { |
329 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: folder {0} not within Suitcase tree", folder.Name); | 329 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: folder {0} not within Suitcase tree", folder.Name); |
@@ -584,7 +584,7 @@ namespace OpenSim.Services.HypergridService | |||
584 | { | 584 | { |
585 | if (a.Wearables[i][j].ItemID == itemID) | 585 | if (a.Wearables[i][j].ItemID == itemID) |
586 | { | 586 | { |
587 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); | 587 | //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID); |
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | } | 590 | } |
@@ -593,7 +593,7 @@ namespace OpenSim.Services.HypergridService | |||
593 | // Check attachments | 593 | // Check attachments |
594 | if (a.GetAttachmentForItem(itemID) != null) | 594 | if (a.GetAttachmentForItem(itemID) != null) |
595 | { | 595 | { |
596 | m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); | 596 | //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID); |
597 | return true; | 597 | return true; |
598 | } | 598 | } |
599 | 599 | ||