diff options
author | UbitUmarov | 2014-07-16 16:16:37 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-16 16:16:37 +0100 |
commit | fc1bd4567db449ddcc99f142027e68e5b890b1f1 (patch) | |
tree | e61e1f2c4f7b6eb09bd427783569827a9bf29855 | |
parent | Merge branch 'avination-current' of ssh://3dhosting.de/var/git/careminster in... (diff) | |
parent | Differentiate between requests only the owner should be able to do and those (diff) | |
download | opensim-SC_OLD-fc1bd4567db449ddcc99f142027e68e5b890b1f1.zip opensim-SC_OLD-fc1bd4567db449ddcc99f142027e68e5b890b1f1.tar.gz opensim-SC_OLD-fc1bd4567db449ddcc99f142027e68e5b890b1f1.tar.bz2 opensim-SC_OLD-fc1bd4567db449ddcc99f142027e68e5b890b1f1.tar.xz |
Merge branch 'avination-current' of ssh://3dhosting.de/var/git/careminster into avination-current
21 files changed, 256 insertions, 91 deletions
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs index 4b7d4c7..dfe9695 100644 --- a/OpenSim/Framework/NetworkServersInfo.cs +++ b/OpenSim/Framework/NetworkServersInfo.cs | |||
@@ -41,6 +41,7 @@ namespace OpenSim.Framework | |||
41 | 41 | ||
42 | // "Out of band" managemnt https | 42 | // "Out of band" managemnt https |
43 | public bool ssl_listener = false; | 43 | public bool ssl_listener = false; |
44 | public bool ssl_external = false; | ||
44 | public uint https_port = 0; | 45 | public uint https_port = 0; |
45 | public string cert_path = String.Empty; | 46 | public string cert_path = String.Empty; |
46 | public string cert_pass = String.Empty; | 47 | public string cert_pass = String.Empty; |
@@ -64,6 +65,7 @@ namespace OpenSim.Framework | |||
64 | 65 | ||
65 | // "Out of band management https" | 66 | // "Out of band management https" |
66 | ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false); | 67 | ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false); |
68 | ssl_external = config.Configs["Network"].GetBoolean("https_external",false); | ||
67 | if( ssl_listener) | 69 | if( ssl_listener) |
68 | { | 70 | { |
69 | cert_path = config.Configs["Network"].GetString("cert_path",String.Empty); | 71 | cert_path = config.Configs["Network"].GetString("cert_path",String.Empty); |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 6dde62f..24ec181 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -224,10 +224,12 @@ namespace OpenSim.Framework | |||
224 | // | 224 | // |
225 | public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource) | 225 | public RegionInfo(string description, XmlNode xmlNode, bool skipConsoleConfig, IConfigSource configSource) |
226 | { | 226 | { |
227 | // m_configSource = configSource; | 227 | XmlElement elem = (XmlElement)xmlNode; |
228 | configMember = | 228 | string name = elem.GetAttribute("Name"); |
229 | new ConfigurationMember(xmlNode, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); | 229 | string xmlstr = "<Nini>" + xmlNode.OuterXml + "</Nini>"; |
230 | configMember.performConfigurationRetrieve(); | 230 | XmlConfigSource source = new XmlConfigSource(XmlReader.Create(new StringReader(xmlstr))); |
231 | ReadNiniConfig(source, name); | ||
232 | |||
231 | m_serverURI = string.Empty; | 233 | m_serverURI = string.Empty; |
232 | } | 234 | } |
233 | 235 | ||
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index c7caf6f..65de563 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -93,8 +93,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
93 | xmlSource.Length); | 93 | xmlSource.Length); |
94 | XmlDocument xmlDoc = new XmlDocument(); | 94 | XmlDocument xmlDoc = new XmlDocument(); |
95 | xmlDoc.LoadXml(xmlSource); | 95 | xmlDoc.LoadXml(xmlSource); |
96 | if (xmlDoc.FirstChild.Name == "Regions") | 96 | if (xmlDoc.FirstChild.Name == "Nini") |
97 | { | 97 | { |
98 | regionCount = xmlDoc.FirstChild.ChildNodes.Count; | 98 | regionCount = xmlDoc.FirstChild.ChildNodes.Count; |
99 | 99 | ||
100 | if (regionCount > 0) | 100 | if (regionCount > 0) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f4ea975..7c62f90 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2233,9 +2233,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2233 | 2233 | ||
2234 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) | 2234 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) |
2235 | { | 2235 | { |
2236 | m_activeGroupID = activegroupid; | 2236 | if (agentid == AgentId) |
2237 | m_activeGroupName = groupname; | 2237 | { |
2238 | m_activeGroupPowers = grouppowers; | 2238 | m_activeGroupID = activegroupid; |
2239 | m_activeGroupName = groupname; | ||
2240 | m_activeGroupPowers = grouppowers; | ||
2241 | } | ||
2239 | 2242 | ||
2240 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); | 2243 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); |
2241 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; | 2244 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 853b72d..287c278 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -100,13 +100,25 @@ namespace OpenSim.Region.ClientStack | |||
100 | // "OOB" Server | 100 | // "OOB" Server |
101 | if (m_networkServersInfo.ssl_listener) | 101 | if (m_networkServersInfo.ssl_listener) |
102 | { | 102 | { |
103 | BaseHttpServer server = new BaseHttpServer( | 103 | if (!m_networkServersInfo.ssl_external) |
104 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | 104 | { |
105 | m_networkServersInfo.cert_pass); | 105 | BaseHttpServer server = new BaseHttpServer( |
106 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | ||
107 | m_networkServersInfo.cert_pass); | ||
106 | 108 | ||
107 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); | 109 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); |
108 | MainServer.AddHttpServer(server); | 110 | MainServer.AddHttpServer(server); |
109 | server.Start(); | 111 | server.Start(); |
112 | } | ||
113 | else | ||
114 | { | ||
115 | BaseHttpServer server = new BaseHttpServer( | ||
116 | m_networkServersInfo.https_port); | ||
117 | |||
118 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); | ||
119 | MainServer.AddHttpServer(server); | ||
120 | server.Start(); | ||
121 | } | ||
110 | } | 122 | } |
111 | 123 | ||
112 | base.StartupSpecific(); | 124 | base.StartupSpecific(); |
@@ -132,4 +144,4 @@ namespace OpenSim.Region.ClientStack | |||
132 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); | 144 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); |
133 | } | 145 | } |
134 | } | 146 | } |
135 | } \ No newline at end of file | 147 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 2d46276..41958b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -40,6 +40,13 @@ using OpenSim.Region.Framework.Scenes; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
42 | { | 42 | { |
43 | public struct SendReply | ||
44 | { | ||
45 | public bool Success; | ||
46 | public string Message; | ||
47 | public int Disposition; | ||
48 | } | ||
49 | |||
43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] |
44 | public class OfflineMessageModule : ISharedRegionModule | 51 | public class OfflineMessageModule : ISharedRegionModule |
45 | { | 52 | { |
@@ -50,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
50 | private string m_RestURL = String.Empty; | 57 | private string m_RestURL = String.Empty; |
51 | IMessageTransferModule m_TransferModule = null; | 58 | IMessageTransferModule m_TransferModule = null; |
52 | private bool m_ForwardOfflineGroupMessages = true; | 59 | private bool m_ForwardOfflineGroupMessages = true; |
60 | private Dictionary<IClientAPI, List<UUID>> m_repliesSent= new Dictionary<IClientAPI, List<UUID>>(); | ||
53 | 61 | ||
54 | public void Initialise(IConfigSource config) | 62 | public void Initialise(IConfigSource config) |
55 | { | 63 | { |
@@ -169,6 +177,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
169 | private void OnNewClient(IClientAPI client) | 177 | private void OnNewClient(IClientAPI client) |
170 | { | 178 | { |
171 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; | 179 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; |
180 | client.OnLogout += OnClientLoggedOut; | ||
181 | } | ||
182 | |||
183 | public void OnClientLoggedOut(IClientAPI client) | ||
184 | { | ||
185 | m_repliesSent.Remove(client); | ||
172 | } | 186 | } |
173 | 187 | ||
174 | private void RetrieveInstantMessages(IClientAPI client) | 188 | private void RetrieveInstantMessages(IClientAPI client) |
@@ -228,7 +242,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
228 | if (scene == null) | 242 | if (scene == null) |
229 | scene = m_SceneList[0]; | 243 | scene = m_SceneList[0]; |
230 | 244 | ||
231 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 245 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
232 | "POST", m_RestURL+"/SaveMessage/?scope=" + | 246 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
233 | scene.RegionInfo.ScopeID.ToString(), im); | 247 | scene.RegionInfo.ScopeID.ToString(), im); |
234 | 248 | ||
@@ -238,13 +252,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
238 | if (client == null) | 252 | if (client == null) |
239 | return; | 253 | return; |
240 | 254 | ||
241 | client.SendInstantMessage(new GridInstantMessage( | 255 | if (reply.Message == String.Empty) |
242 | null, new UUID(im.toAgentID), | 256 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
243 | "System", new UUID(im.fromAgentID), | 257 | |
244 | (byte)InstantMessageDialog.MessageFromAgent, | 258 | bool sendReply = true; |
245 | "User is not logged in. "+ | 259 | |
246 | (success ? "Message saved." : "Message not saved"), | 260 | switch (reply.Disposition) |
247 | false, new Vector3())); | 261 | { |
262 | case 0: // Normal | ||
263 | break; | ||
264 | case 1: // Only once per user | ||
265 | if (m_repliesSent.ContainsKey(client) && m_repliesSent[client].Contains(new UUID(im.toAgentID))) | ||
266 | { | ||
267 | sendReply = false; | ||
268 | } | ||
269 | else | ||
270 | { | ||
271 | if (!m_repliesSent.ContainsKey(client)) | ||
272 | m_repliesSent[client] = new List<UUID>(); | ||
273 | m_repliesSent[client].Add(new UUID(im.toAgentID)); | ||
274 | } | ||
275 | break; | ||
276 | } | ||
277 | |||
278 | if (sendReply) | ||
279 | { | ||
280 | client.SendInstantMessage(new GridInstantMessage( | ||
281 | null, new UUID(im.toAgentID), | ||
282 | "System", new UUID(im.fromAgentID), | ||
283 | (byte)InstantMessageDialog.MessageFromAgent, | ||
284 | reply.Message, | ||
285 | false, new Vector3())); | ||
286 | } | ||
248 | } | 287 | } |
249 | } | 288 | } |
250 | } | 289 | } |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index a5f5749..834fd77 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -96,6 +96,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
96 | 96 | ||
97 | m_commands = new EstateManagementCommands(this); | 97 | m_commands = new EstateManagementCommands(this); |
98 | m_commands.Initialise(); | 98 | m_commands.Initialise(); |
99 | |||
100 | m_regionChangeTimer.Interval = 10000; | ||
101 | m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; | ||
102 | m_regionChangeTimer.AutoReset = false; | ||
99 | } | 103 | } |
100 | 104 | ||
101 | public void RemoveRegion(Scene scene) {} | 105 | public void RemoveRegion(Scene scene) {} |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index c307998..4e21724 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -565,7 +565,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
565 | requiredPowers = GroupPowers.LandManageBanned; | 565 | requiredPowers = GroupPowers.LandManageBanned; |
566 | 566 | ||
567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, | 567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, |
568 | land, requiredPowers)) | 568 | land, requiredPowers, false)) |
569 | { | 569 | { |
570 | land.UpdateAccessList(flags, transactionID, sequenceID, | 570 | land.UpdateAccessList(flags, transactionID, sequenceID, |
571 | sections, entries, remote_client); | 571 | sections, entries, remote_client); |
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
927 | 927 | ||
928 | //If we are still here, then they are subdividing within one piece of land | 928 | //If we are still here, then they are subdividing within one piece of land |
929 | //Check owner | 929 | //Check owner |
930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin)) | 930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true)) |
931 | { | 931 | { |
932 | return; | 932 | return; |
933 | } | 933 | } |
@@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
996 | { | 996 | { |
997 | return; | 997 | return; |
998 | } | 998 | } |
999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin)) | 999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin, true)) |
1000 | { | 1000 | { |
1001 | return; | 1001 | return; |
1002 | } | 1002 | } |
@@ -1727,7 +1727,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1727 | 1727 | ||
1728 | if (land == null) return; | 1728 | if (land == null) return; |
1729 | 1729 | ||
1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions)) | 1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions, false)) |
1731 | return; | 1731 | return; |
1732 | 1732 | ||
1733 | land.LandData.OtherCleanTime = otherCleanTime; | 1733 | land.LandData.OtherCleanTime = otherCleanTime; |
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1827 | if (targetAvatar.UserLevel == 0) | 1827 | if (targetAvatar.UserLevel == 0) |
1828 | { | 1828 | { |
1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze)) | 1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) |
1831 | return; | 1831 | return; |
1832 | if (flags == 0) | 1832 | if (flags == 0) |
1833 | { | 1833 | { |
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1876 | 1876 | ||
1877 | // Check if you even have permission to do this | 1877 | // Check if you even have permission to do this |
1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze) && | 1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true) && |
1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) | 1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) |
1881 | return; | 1881 | return; |
1882 | 1882 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 07d00c0..2eafd44 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
286 | // ParcelFlags.ForSaleObjects | 286 | // ParcelFlags.ForSaleObjects |
287 | // ParcelFlags.LindenHome | 287 | // ParcelFlags.LindenHome |
288 | 288 | ||
289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, false)) |
290 | { | 290 | { |
291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | | 291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | |
292 | ParcelFlags.AllowTerraform | | 292 | ParcelFlags.AllowTerraform | |
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
301 | ParcelFlags.AllowFly); | 301 | ParcelFlags.AllowFly); |
302 | } | 302 | } |
303 | 303 | ||
304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale)) | 304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale, true)) |
305 | { | 305 | { |
306 | if (args.AuthBuyerID != newData.AuthBuyerID || | 306 | if (args.AuthBuyerID != newData.AuthBuyerID || |
307 | args.SalePrice != newData.SalePrice) | 307 | args.SalePrice != newData.SalePrice) |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
324 | allowedDelta |= (uint)ParcelFlags.ForSale; | 324 | allowedDelta |= (uint)ParcelFlags.ForSale; |
325 | } | 325 | } |
326 | 326 | ||
327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces)) | 327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces, false)) |
328 | { | 328 | { |
329 | newData.Category = args.Category; | 329 | newData.Category = args.Category; |
330 | 330 | ||
@@ -333,21 +333,21 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); | 333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); |
334 | } | 334 | } |
335 | 335 | ||
336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity)) | 336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity, false)) |
337 | { | 337 | { |
338 | newData.Description = args.Desc; | 338 | newData.Description = args.Desc; |
339 | newData.Name = args.Name; | 339 | newData.Name = args.Name; |
340 | newData.SnapshotID = args.SnapshotID; | 340 | newData.SnapshotID = args.SnapshotID; |
341 | } | 341 | } |
342 | 342 | ||
343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint)) | 343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint, false)) |
344 | { | 344 | { |
345 | newData.LandingType = args.LandingType; | 345 | newData.LandingType = args.LandingType; |
346 | newData.UserLocation = args.UserLocation; | 346 | newData.UserLocation = args.UserLocation; |
347 | newData.UserLookAt = args.UserLookAt; | 347 | newData.UserLookAt = args.UserLookAt; |
348 | } | 348 | } |
349 | 349 | ||
350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia)) | 350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia, false)) |
351 | { | 351 | { |
352 | newData.MediaAutoScale = args.MediaAutoScale; | 352 | newData.MediaAutoScale = args.MediaAutoScale; |
353 | newData.MediaID = args.MediaID; | 353 | newData.MediaID = args.MediaID; |
@@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
368 | ParcelFlags.UseEstateVoiceChan); | 368 | ParcelFlags.UseEstateVoiceChan); |
369 | } | 369 | } |
370 | 370 | ||
371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses)) | 371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses, false)) |
372 | { | 372 | { |
373 | newData.PassHours = args.PassHours; | 373 | newData.PassHours = args.PassHours; |
374 | newData.PassPrice = args.PassPrice; | 374 | newData.PassPrice = args.PassPrice; |
@@ -376,25 +376,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
376 | allowedDelta |= (uint)ParcelFlags.UsePassList; | 376 | allowedDelta |= (uint)ParcelFlags.UsePassList; |
377 | } | 377 | } |
378 | 378 | ||
379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed)) | 379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed, false)) |
380 | { | 380 | { |
381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | | 381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | |
382 | ParcelFlags.UseAccessList); | 382 | ParcelFlags.UseAccessList); |
383 | } | 383 | } |
384 | 384 | ||
385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned)) | 385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned, false)) |
386 | { | 386 | { |
387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | | 387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | |
388 | ParcelFlags.DenyAnonymous | | 388 | ParcelFlags.DenyAnonymous | |
389 | ParcelFlags.DenyAgeUnverified); | 389 | ParcelFlags.DenyAgeUnverified); |
390 | } | 390 | } |
391 | 391 | ||
392 | uint preserve = LandData.Flags & ~allowedDelta; | 392 | if (allowedDelta != (uint)ParcelFlags.None) |
393 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); | 393 | { |
394 | 394 | uint preserve = LandData.Flags & ~allowedDelta; | |
395 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 395 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); |
396 | 396 | ||
397 | SendLandUpdateToAvatarsOverMe(snap_selection); | 397 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
398 | SendLandUpdateToAvatarsOverMe(snap_selection); | ||
399 | } | ||
398 | } | 400 | } |
399 | 401 | ||
400 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 402 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
@@ -950,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
950 | 952 | ||
951 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) | 953 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) |
952 | { | 954 | { |
953 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 955 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
954 | { | 956 | { |
955 | List<uint> resultLocalIDs = new List<uint>(); | 957 | List<uint> resultLocalIDs = new List<uint>(); |
956 | try | 958 | try |
@@ -1000,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1000 | /// </param> | 1002 | /// </param> |
1001 | public void SendLandObjectOwners(IClientAPI remote_client) | 1003 | public void SendLandObjectOwners(IClientAPI remote_client) |
1002 | { | 1004 | { |
1003 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 1005 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
1004 | { | 1006 | { |
1005 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); | 1007 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); |
1006 | List<UUID> groups = new List<UUID>(); | 1008 | List<UUID> groups = new List<UUID>(); |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 26e9131..4f5b9b7 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1047 | return GenericObjectPermission(editorID, objectID, false); | 1047 | return GenericObjectPermission(editorID, objectID, false); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene) | 1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager) |
1051 | { | 1051 | { |
1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 535d87a..4d90726 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); | 70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); |
71 | public delegate bool IsAdministratorHandler(UUID user); | 71 | public delegate bool IsAdministratorHandler(UUID user); |
72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); | 72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); |
73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene); | 73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager); |
74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); | 74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); |
75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); | 75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); |
76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); | 76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); |
@@ -763,7 +763,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
763 | 763 | ||
764 | #region EDIT PARCEL | 764 | #region EDIT PARCEL |
765 | 765 | ||
766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p) | 766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, bool allowManager) |
767 | { | 767 | { |
768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; | 768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; |
769 | if (handler != null) | 769 | if (handler != null) |
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
771 | Delegate[] list = handler.GetInvocationList(); | 771 | Delegate[] list = handler.GetInvocationList(); |
772 | foreach (EditParcelPropertiesHandler h in list) | 772 | foreach (EditParcelPropertiesHandler h in list) |
773 | { | 773 | { |
774 | if (h(user, parcel, p, m_scene) == false) | 774 | if (h(user, parcel, p, m_scene, allowManager) == false) |
775 | return false; | 775 | return false; |
776 | } | 776 | } |
777 | } | 777 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3e1dcaa..86f60bb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1886,25 +1886,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1886 | { | 1886 | { |
1887 | SceneObjectPart part = parts[i]; | 1887 | SceneObjectPart part = parts[i]; |
1888 | 1888 | ||
1889 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) | 1889 | if (Scene != null) |
1890 | { | 1890 | { |
1891 | if (avatar.ParentID == LocalId) | 1891 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) |
1892 | avatar.StandUp(); | ||
1893 | |||
1894 | if (!silent) | ||
1895 | { | 1892 | { |
1896 | part.ClearUpdateSchedule(); | 1893 | if (avatar.ParentID == LocalId) |
1897 | if (part == m_rootPart) | 1894 | avatar.StandUp(); |
1895 | |||
1896 | if (!silent) | ||
1898 | { | 1897 | { |
1899 | if (!IsAttachment | 1898 | part.ClearUpdateSchedule(); |
1900 | || AttachedAvatar == avatar.ControllingClient.AgentId | 1899 | if (part == m_rootPart) |
1901 | || !HasPrivateAttachmentPoint) | 1900 | { |
1902 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | 1901 | if (!IsAttachment |
1902 | || AttachedAvatar == avatar.ControllingClient.AgentId | ||
1903 | || !HasPrivateAttachmentPoint) | ||
1904 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | ||
1905 | } | ||
1903 | } | 1906 | } |
1904 | } | 1907 | }); |
1905 | }); | 1908 | } |
1906 | } | 1909 | } |
1907 | |||
1908 | } | 1910 | } |
1909 | 1911 | ||
1910 | public void AddScriptLPS(int count) | 1912 | public void AddScriptLPS(int count) |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index e756c70..9e6cc1a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -635,15 +635,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
635 | // TODO: EstateSettings don't seem to get propagated... | 635 | // TODO: EstateSettings don't seem to get propagated... |
636 | if (!scene.RegionInfo.EstateSettings.AllowVoice) | 636 | if (!scene.RegionInfo.EstateSettings.AllowVoice) |
637 | { | 637 | { |
638 | m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", | 638 | //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", |
639 | scene.RegionInfo.RegionName); | 639 | // scene.RegionInfo.RegionName); |
640 | channel_uri = String.Empty; | 640 | channel_uri = String.Empty; |
641 | } | 641 | } |
642 | 642 | ||
643 | if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) | 643 | if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) |
644 | { | 644 | { |
645 | m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", | 645 | //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", |
646 | scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); | 646 | // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); |
647 | channel_uri = String.Empty; | 647 | channel_uri = String.Empty; |
648 | } | 648 | } |
649 | else | 649 | else |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs index 7c662c9..40ed3fd 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs | |||
@@ -105,9 +105,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
105 | return m_rootScene.Permissions.CanEditObject(objectid, editorid); | 105 | return m_rootScene.Permissions.CanEditObject(objectid, editorid); |
106 | } | 106 | } |
107 | 107 | ||
108 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene) | 108 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene, bool allowManager) |
109 | { | 109 | { |
110 | return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g); | 110 | return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g, allowManager); |
111 | } | 111 | } |
112 | 112 | ||
113 | public bool CanInstantMessage(UUID user, UUID target, Scene startscene) | 113 | public bool CanInstantMessage(UUID user, UUID target, Scene startscene) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e8502ac..3f0af6d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7106,7 +7106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7106 | UUID key; | 7106 | UUID key; |
7107 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 7107 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
7108 | 7108 | ||
7109 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 7109 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
7110 | { | 7110 | { |
7111 | int expires = 0; | 7111 | int expires = 0; |
7112 | if (hours != 0) | 7112 | if (hours != 0) |
@@ -10431,7 +10431,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10431 | // according to the docs, this command only works if script owner and land owner are the same | 10431 | // according to the docs, this command only works if script owner and land owner are the same |
10432 | // lets add estate owners and gods, too, and use the generic permission check. | 10432 | // lets add estate owners and gods, too, and use the generic permission check. |
10433 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10433 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10434 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return; | 10434 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia, false)) return; |
10435 | 10435 | ||
10436 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? | 10436 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? |
10437 | byte loop = 0; | 10437 | byte loop = 0; |
@@ -10874,7 +10874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10874 | m_host.AddScriptLPS(1); | 10874 | m_host.AddScriptLPS(1); |
10875 | UUID key; | 10875 | UUID key; |
10876 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10876 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10877 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 10877 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
10878 | { | 10878 | { |
10879 | int expires = 0; | 10879 | int expires = 0; |
10880 | if (hours != 0) | 10880 | if (hours != 0) |
@@ -10915,7 +10915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10915 | m_host.AddScriptLPS(1); | 10915 | m_host.AddScriptLPS(1); |
10916 | UUID key; | 10916 | UUID key; |
10917 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10917 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10918 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed)) | 10918 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed, false)) |
10919 | { | 10919 | { |
10920 | if (UUID.TryParse(avatar, out key)) | 10920 | if (UUID.TryParse(avatar, out key)) |
10921 | { | 10921 | { |
@@ -10942,7 +10942,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10942 | m_host.AddScriptLPS(1); | 10942 | m_host.AddScriptLPS(1); |
10943 | UUID key; | 10943 | UUID key; |
10944 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10944 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10945 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 10945 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
10946 | { | 10946 | { |
10947 | if (UUID.TryParse(avatar, out key)) | 10947 | if (UUID.TryParse(avatar, out key)) |
10948 | { | 10948 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index f4e4f44..9c148d1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1434,7 +1434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1434 | return; | 1434 | return; |
1435 | } | 1435 | } |
1436 | 1436 | ||
1437 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions)) | 1437 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions, false)) |
1438 | { | 1438 | { |
1439 | OSSLShoutError("You do not have permission to modify the parcel"); | 1439 | OSSLShoutError("You do not have permission to modify the parcel"); |
1440 | return; | 1440 | return; |
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index 954783c..eed2645 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Server.Base | |||
40 | { | 40 | { |
41 | public class HttpServerBase : ServicesServerBase | 41 | public class HttpServerBase : ServicesServerBase |
42 | { | 42 | { |
43 | // private static readonly ILog m_Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | private uint m_consolePort; | 45 | private uint m_consolePort; |
46 | 46 | ||
@@ -69,6 +69,7 @@ namespace OpenSim.Server.Base | |||
69 | 69 | ||
70 | bool ssl_main = networkConfig.GetBoolean("https_main",false); | 70 | bool ssl_main = networkConfig.GetBoolean("https_main",false); |
71 | bool ssl_listener = networkConfig.GetBoolean("https_listener",false); | 71 | bool ssl_listener = networkConfig.GetBoolean("https_listener",false); |
72 | bool ssl_external = networkConfig.GetBoolean("https_external",false); | ||
72 | 73 | ||
73 | m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0); | 74 | m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0); |
74 | 75 | ||
@@ -113,20 +114,29 @@ namespace OpenSim.Server.Base | |||
113 | 114 | ||
114 | uint https_port = (uint)networkConfig.GetInt("https_port", 0); | 115 | uint https_port = (uint)networkConfig.GetInt("https_port", 0); |
115 | 116 | ||
116 | string cert_path = networkConfig.GetString("cert_path",String.Empty); | 117 | m_log.WarnFormat("[SSL]: External flag is {0}", ssl_external); |
117 | if ( cert_path == String.Empty ) | 118 | if (!ssl_external) |
118 | { | 119 | { |
119 | System.Console.WriteLine("Path to X509 certificate is missing, server can't start."); | 120 | string cert_path = networkConfig.GetString("cert_path",String.Empty); |
120 | Thread.CurrentThread.Abort(); | 121 | if ( cert_path == String.Empty ) |
122 | { | ||
123 | System.Console.WriteLine("Path to X509 certificate is missing, server can't start."); | ||
124 | Thread.CurrentThread.Abort(); | ||
125 | } | ||
126 | string cert_pass = networkConfig.GetString("cert_pass",String.Empty); | ||
127 | if ( cert_pass == String.Empty ) | ||
128 | { | ||
129 | System.Console.WriteLine("Password for X509 certificate is missing, server can't start."); | ||
130 | Thread.CurrentThread.Abort(); | ||
131 | } | ||
132 | |||
133 | MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass)); | ||
121 | } | 134 | } |
122 | string cert_pass = networkConfig.GetString("cert_pass",String.Empty); | 135 | else |
123 | if ( cert_pass == String.Empty ) | ||
124 | { | 136 | { |
125 | System.Console.WriteLine("Password for X509 certificate is missing, server can't start."); | 137 | m_log.WarnFormat("[SSL]: SSL port is active but no SSL is used because external SSL was requested."); |
126 | Thread.CurrentThread.Abort(); | 138 | MainServer.AddHttpServer(new BaseHttpServer(https_port)); |
127 | } | 139 | } |
128 | |||
129 | MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass)); | ||
130 | } | 140 | } |
131 | } | 141 | } |
132 | 142 | ||
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs index 30bfb70..267dd71 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServicesConnector.cs | |||
@@ -86,6 +86,66 @@ namespace OpenSim.Services.Connectors | |||
86 | m_ServerURI = serviceURI.TrimEnd('/'); | 86 | m_ServerURI = serviceURI.TrimEnd('/'); |
87 | } | 87 | } |
88 | 88 | ||
89 | public bool RemoveMapTile(int x, int y, out string reason) | ||
90 | { | ||
91 | reason = string.Empty; | ||
92 | int tickstart = Util.EnvironmentTickCount(); | ||
93 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
94 | sendData["X"] = x.ToString(); | ||
95 | sendData["Y"] = y.ToString(); | ||
96 | |||
97 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
98 | string uri = m_ServerURI + "/removemap"; | ||
99 | |||
100 | try | ||
101 | { | ||
102 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", | ||
103 | uri, | ||
104 | reqString); | ||
105 | if (reply != string.Empty) | ||
106 | { | ||
107 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
108 | |||
109 | if (replyData.ContainsKey("Result") && (replyData["Result"].ToString().ToLower() == "success")) | ||
110 | { | ||
111 | return true; | ||
112 | } | ||
113 | else if (replyData.ContainsKey("Result") && (replyData["Result"].ToString().ToLower() == "failure")) | ||
114 | { | ||
115 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Delete failed: {0}", replyData["Message"].ToString()); | ||
116 | reason = replyData["Message"].ToString(); | ||
117 | return false; | ||
118 | } | ||
119 | else if (!replyData.ContainsKey("Result")) | ||
120 | { | ||
121 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: reply data does not contain result field"); | ||
122 | } | ||
123 | else | ||
124 | { | ||
125 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); | ||
126 | reason = "Unexpected result " + replyData["Result"].ToString(); | ||
127 | } | ||
128 | |||
129 | } | ||
130 | else | ||
131 | { | ||
132 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Map post received null reply"); | ||
133 | } | ||
134 | } | ||
135 | catch (Exception e) | ||
136 | { | ||
137 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Exception when contacting map server at {0}: {1}", uri, e.Message); | ||
138 | } | ||
139 | finally | ||
140 | { | ||
141 | // This just dumps a warning for any operation that takes more than 100 ms | ||
142 | int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); | ||
143 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: map tile deleted in {0}ms", tickdiff); | ||
144 | } | ||
145 | |||
146 | return false; | ||
147 | } | ||
148 | |||
89 | public bool AddMapTile(int x, int y, byte[] jpgData, out string reason) | 149 | public bool AddMapTile(int x, int y, byte[] jpgData, out string reason) |
90 | { | 150 | { |
91 | reason = string.Empty; | 151 | reason = string.Empty; |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index daebf8b..7f71835 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -283,7 +283,7 @@ namespace OpenSim.Services.GridService | |||
283 | 283 | ||
284 | int flags = Convert.ToInt32(region.Data["flags"]); | 284 | int flags = Convert.ToInt32(region.Data["flags"]); |
285 | 285 | ||
286 | if (!m_DeleteOnUnregister || (flags & (int)OpenSim.Framework.RegionFlags.Persistent) != 0) | 286 | if ((!m_DeleteOnUnregister) || ((flags & (int)OpenSim.Framework.RegionFlags.Persistent) != 0)) |
287 | { | 287 | { |
288 | flags &= ~(int)OpenSim.Framework.RegionFlags.RegionOnline; | 288 | flags &= ~(int)OpenSim.Framework.RegionFlags.RegionOnline; |
289 | region.Data["flags"] = flags.ToString(); | 289 | region.Data["flags"] = flags.ToString(); |
@@ -298,7 +298,6 @@ namespace OpenSim.Services.GridService | |||
298 | } | 298 | } |
299 | 299 | ||
300 | return true; | 300 | return true; |
301 | |||
302 | } | 301 | } |
303 | 302 | ||
304 | return m_Database.Delete(regionID); | 303 | return m_Database.Delete(regionID); |
diff --git a/OpenSim/Services/Interfaces/IMapImageService.cs b/OpenSim/Services/Interfaces/IMapImageService.cs index a7b2cf1..78daa5f 100644 --- a/OpenSim/Services/Interfaces/IMapImageService.cs +++ b/OpenSim/Services/Interfaces/IMapImageService.cs | |||
@@ -35,6 +35,7 @@ namespace OpenSim.Services.Interfaces | |||
35 | { | 35 | { |
36 | //List<MapBlockData> GetMapBlocks(UUID scopeID, int minX, int minY, int maxX, int maxY); | 36 | //List<MapBlockData> GetMapBlocks(UUID scopeID, int minX, int minY, int maxX, int maxY); |
37 | bool AddMapTile(int x, int y, byte[] imageData, out string reason); | 37 | bool AddMapTile(int x, int y, byte[] imageData, out string reason); |
38 | bool RemoveMapTile(int x, int y, out string reason); | ||
38 | byte[] GetMapTile(string fileName, out string format); | 39 | byte[] GetMapTile(string fileName, out string format); |
39 | } | 40 | } |
40 | } | 41 | } |
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs index a85ee70..e2f256f 100644 --- a/OpenSim/Services/MapImageService/MapImageService.cs +++ b/OpenSim/Services/MapImageService/MapImageService.cs | |||
@@ -112,9 +112,38 @@ namespace OpenSim.Services.MapImageService | |||
112 | reason = e.Message; | 112 | reason = e.Message; |
113 | return false; | 113 | return false; |
114 | } | 114 | } |
115 | } | ||
116 | |||
117 | return UpdateMultiResolutionFiles(x, y, out reason); | ||
118 | } | ||
119 | |||
120 | public bool RemoveMapTile(int x, int y, out string reason) | ||
121 | { | ||
122 | reason = String.Empty; | ||
123 | string fileName = GetFileName(1, x, y); | ||
124 | |||
125 | lock (m_Sync) | ||
126 | { | ||
127 | try | ||
128 | { | ||
129 | File.Delete(fileName); | ||
130 | } | ||
131 | catch (Exception e) | ||
132 | { | ||
133 | m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to save delete file {0}: {1}", fileName, e); | ||
134 | reason = e.Message; | ||
135 | return false; | ||
136 | } | ||
137 | } | ||
115 | 138 | ||
116 | // Also save in png format? | 139 | return UpdateMultiResolutionFiles(x, y, out reason); |
140 | } | ||
117 | 141 | ||
142 | private bool UpdateMultiResolutionFiles(int x, int y, out string reason) | ||
143 | { | ||
144 | reason = String.Empty; | ||
145 | lock (m_Sync) | ||
146 | { | ||
118 | // Stitch seven more aggregate tiles together | 147 | // Stitch seven more aggregate tiles together |
119 | for (uint zoomLevel = 2; zoomLevel <= ZOOM_LEVELS; zoomLevel++) | 148 | for (uint zoomLevel = 2; zoomLevel <= ZOOM_LEVELS; zoomLevel++) |
120 | { | 149 | { |
@@ -126,7 +155,7 @@ namespace OpenSim.Services.MapImageService | |||
126 | 155 | ||
127 | if (!CreateTile(zoomLevel, x1, y1)) | 156 | if (!CreateTile(zoomLevel, x1, y1)) |
128 | { | 157 | { |
129 | m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to create tile for {0} at zoom level {1}", fileName, zoomLevel); | 158 | m_log.WarnFormat("[MAP IMAGE SERVICE]: Unable to create tile for {0},{1} at zoom level {1}", x, y, zoomLevel); |
130 | reason = string.Format("Map tile at zoom level {0} failed", zoomLevel); | 159 | reason = string.Format("Map tile at zoom level {0} failed", zoomLevel); |
131 | return false; | 160 | return false; |
132 | } | 161 | } |