diff options
46 files changed, 937 insertions, 179 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs index 13d7a8a..2b91fc5 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderWebServer.cs | |||
@@ -93,6 +93,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
93 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + | 93 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + |
94 | xmlSource.Length); | 94 | xmlSource.Length); |
95 | XmlDocument xmlDoc = new XmlDocument(); | 95 | XmlDocument xmlDoc = new XmlDocument(); |
96 | xmlDoc.XmlResolver = null; | ||
96 | xmlDoc.LoadXml(xmlSource); | 97 | xmlDoc.LoadXml(xmlSource); |
97 | if (xmlDoc.FirstChild.Name == "Nini") | 98 | if (xmlDoc.FirstChild.Name == "Nini") |
98 | { | 99 | { |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 510905f..84d87f1 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -3138,6 +3138,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
3138 | if (File.Exists(defaultAppearanceFileName)) | 3138 | if (File.Exists(defaultAppearanceFileName)) |
3139 | { | 3139 | { |
3140 | XmlDocument doc = new XmlDocument(); | 3140 | XmlDocument doc = new XmlDocument(); |
3141 | doc.XmlResolver=null; | ||
3141 | string name = "*unknown*"; | 3142 | string name = "*unknown*"; |
3142 | string email = "anon@anon"; | 3143 | string email = "anon@anon"; |
3143 | uint regionXLocation = 1000; | 3144 | uint regionXLocation = 1000; |
diff --git a/OpenSim/Capabilities/LLSD.cs b/OpenSim/Capabilities/LLSD.cs index 76e439f..5ed312c 100644 --- a/OpenSim/Capabilities/LLSD.cs +++ b/OpenSim/Capabilities/LLSD.cs | |||
@@ -83,6 +83,9 @@ namespace OpenSim.Framework.Capabilities | |||
83 | { | 83 | { |
84 | using (XmlTextReader reader = new XmlTextReader(st)) | 84 | using (XmlTextReader reader = new XmlTextReader(st)) |
85 | { | 85 | { |
86 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
87 | reader.XmlResolver = null; | ||
88 | |||
86 | reader.Read(); | 89 | reader.Read(); |
87 | SkipWS(reader); | 90 | SkipWS(reader); |
88 | 91 | ||
diff --git a/OpenSim/ConsoleClient/ConsoleClient.cs b/OpenSim/ConsoleClient/ConsoleClient.cs index e689424..c395cd7 100644 --- a/OpenSim/ConsoleClient/ConsoleClient.cs +++ b/OpenSim/ConsoleClient/ConsoleClient.cs | |||
@@ -110,6 +110,7 @@ namespace OpenSim.ConsoleClient | |||
110 | public static void LoginReply(string requestUrl, string requestData, string replyData) | 110 | public static void LoginReply(string requestUrl, string requestData, string replyData) |
111 | { | 111 | { |
112 | XmlDocument doc = new XmlDocument(); | 112 | XmlDocument doc = new XmlDocument(); |
113 | doc.XmlResolver=null; | ||
113 | 114 | ||
114 | doc.LoadXml(replyData); | 115 | doc.LoadXml(replyData); |
115 | 116 | ||
@@ -169,6 +170,7 @@ namespace OpenSim.ConsoleClient | |||
169 | public static void ReadResponses(string requestUrl, string requestData, string replyData) | 170 | public static void ReadResponses(string requestUrl, string requestData, string replyData) |
170 | { | 171 | { |
171 | XmlDocument doc = new XmlDocument(); | 172 | XmlDocument doc = new XmlDocument(); |
173 | doc.XmlResolver=null; | ||
172 | 174 | ||
173 | doc.LoadXml(replyData); | 175 | doc.LoadXml(replyData); |
174 | 176 | ||
diff --git a/OpenSim/Framework/PhysicsInertia.cs b/OpenSim/Framework/PhysicsInertia.cs index 6e15791..8a0e43e 100644 --- a/OpenSim/Framework/PhysicsInertia.cs +++ b/OpenSim/Framework/PhysicsInertia.cs | |||
@@ -187,16 +187,18 @@ namespace OpenSim.Framework | |||
187 | if (text == String.Empty) | 187 | if (text == String.Empty) |
188 | return null; | 188 | return null; |
189 | 189 | ||
190 | UTF8Encoding enc = new UTF8Encoding(); | ||
191 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); | ||
192 | XmlTextReader xreader = new XmlTextReader(ms); | ||
193 | |||
194 | PhysicsInertiaData v = new PhysicsInertiaData(); | ||
195 | bool error; | 190 | bool error; |
191 | PhysicsInertiaData v; | ||
192 | UTF8Encoding enc = new UTF8Encoding(); | ||
193 | using(MemoryStream ms = new MemoryStream(enc.GetBytes(text))) | ||
194 | using(XmlTextReader xreader = new XmlTextReader(ms)) | ||
195 | { | ||
196 | xreader.DtdProcessing = DtdProcessing.Prohibit; | ||
197 | xreader.XmlResolver = null; | ||
196 | 198 | ||
197 | v.FromXml2(xreader, out error); | 199 | v = new PhysicsInertiaData(); |
198 | 200 | v.FromXml2(xreader, out error); | |
199 | xreader.Close(); | 201 | } |
200 | 202 | ||
201 | if (error) | 203 | if (error) |
202 | return null; | 204 | return null; |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 5056c04..1dc8bc3 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -1595,6 +1595,9 @@ namespace OpenSim.Framework | |||
1595 | { | 1595 | { |
1596 | using (XmlTextReader xtr = new XmlTextReader(sr)) | 1596 | using (XmlTextReader xtr = new XmlTextReader(sr)) |
1597 | { | 1597 | { |
1598 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
1599 | xtr.XmlResolver = null; | ||
1600 | |||
1598 | xtr.MoveToContent(); | 1601 | xtr.MoveToContent(); |
1599 | 1602 | ||
1600 | string type = xtr.GetAttribute("type"); | 1603 | string type = xtr.GetAttribute("type"); |
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs index 1523fa9..da877a7 100644 --- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs +++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs | |||
@@ -156,6 +156,7 @@ namespace OpenSim.Framework.Serialization.External | |||
156 | return xml; | 156 | return xml; |
157 | 157 | ||
158 | XmlDocument doc = new XmlDocument(); | 158 | XmlDocument doc = new XmlDocument(); |
159 | doc.XmlResolver=null; | ||
159 | doc.LoadXml(xml); | 160 | doc.LoadXml(xml); |
160 | XmlNodeList sops = doc.GetElementsByTagName("SceneObjectPart"); | 161 | XmlNodeList sops = doc.GetElementsByTagName("SceneObjectPart"); |
161 | 162 | ||
@@ -220,7 +221,7 @@ namespace OpenSim.Framework.Serialization.External | |||
220 | using (StringWriter sw = new StringWriter()) | 221 | using (StringWriter sw = new StringWriter()) |
221 | using (XmlTextWriter writer = new XmlTextWriter(sw)) | 222 | using (XmlTextWriter writer = new XmlTextWriter(sw)) |
222 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 223 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
223 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 224 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
224 | { | 225 | { |
225 | TransformXml(reader, writer, sceneName, homeURL, userService, scopeID); | 226 | TransformXml(reader, writer, sceneName, homeURL, userService, scopeID); |
226 | 227 | ||
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs index e42d56f..d323f45 100644 --- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs +++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs | |||
@@ -178,6 +178,8 @@ namespace OpenSim.Framework.Serialization.External | |||
178 | 178 | ||
179 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData))) | 179 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serializedLandData))) |
180 | { | 180 | { |
181 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
182 | reader.XmlResolver = null; | ||
181 | reader.ReadStartElement("LandData"); | 183 | reader.ReadStartElement("LandData"); |
182 | 184 | ||
183 | ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader); | 185 | ExternalRepresentationUtils.ExecuteReadProcessors<LandData>(landData, m_ldProcessors, reader); |
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs index 617c451..fb4f904 100644 --- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs +++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs | |||
@@ -63,6 +63,8 @@ namespace OpenSim.Framework.Serialization.External | |||
63 | 63 | ||
64 | StringReader sr = new StringReader(serializedSettings); | 64 | StringReader sr = new StringReader(serializedSettings); |
65 | XmlTextReader xtr = new XmlTextReader(sr); | 65 | XmlTextReader xtr = new XmlTextReader(sr); |
66 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
67 | xtr.XmlResolver = null; | ||
66 | 68 | ||
67 | xtr.ReadStartElement("RegionSettings"); | 69 | xtr.ReadStartElement("RegionSettings"); |
68 | 70 | ||
diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs index 9b02553..3c51140 100644 --- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs | |||
@@ -202,6 +202,9 @@ namespace OpenSim.Framework.Serialization.External | |||
202 | 202 | ||
203 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization))) | 203 | using (XmlTextReader reader = new XmlTextReader(new StringReader(serialization))) |
204 | { | 204 | { |
205 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
206 | reader.XmlResolver = null; | ||
207 | |||
205 | reader.ReadStartElement("InventoryItem"); | 208 | reader.ReadStartElement("InventoryItem"); |
206 | 209 | ||
207 | ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>( | 210 | ExternalRepresentationUtils.ExecuteReadProcessors<InventoryItemBase>( |
diff --git a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs index bd55657..fbc51d5 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs | |||
@@ -54,6 +54,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
54 | TRequest deserial; | 54 | TRequest deserial; |
55 | using (XmlTextReader xmlReader = new XmlTextReader(request)) | 55 | using (XmlTextReader xmlReader = new XmlTextReader(request)) |
56 | { | 56 | { |
57 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
58 | xmlReader.XmlResolver = null; | ||
59 | |||
57 | XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); | 60 | XmlSerializer deserializer = new XmlSerializer(typeof (TRequest)); |
58 | deserial = (TRequest) deserializer.Deserialize(xmlReader); | 61 | deserial = (TRequest) deserializer.Deserialize(xmlReader); |
59 | } | 62 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs index 68073c1..dc720dd 100644 --- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs +++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs | |||
@@ -210,6 +210,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
210 | { | 210 | { |
211 | try | 211 | try |
212 | { | 212 | { |
213 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
214 | xmlReader.XmlResolver = null; | ||
213 | XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>)); | 215 | XmlSerializer deserializer = new XmlSerializer(typeof(RestSessionObject<TRequest>)); |
214 | deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader); | 216 | deserial = (RestSessionObject<TRequest>)deserializer.Deserialize(xmlReader); |
215 | } | 217 | } |
@@ -269,6 +271,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
269 | { | 271 | { |
270 | try | 272 | try |
271 | { | 273 | { |
274 | xmlReader.DtdProcessing = DtdProcessing.Prohibit; | ||
275 | xmlReader.XmlResolver = null; | ||
272 | XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); | 276 | XmlSerializer deserializer = new XmlSerializer(typeof(TRequest)); |
273 | deserial = (TRequest)deserializer.Deserialize(xmlReader); | 277 | deserial = (TRequest)deserializer.Deserialize(xmlReader); |
274 | } | 278 | } |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index a42dcc6..7093010 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -671,6 +671,7 @@ namespace OpenSim.Framework | |||
671 | public static string GetFormattedXml(string rawXml) | 671 | public static string GetFormattedXml(string rawXml) |
672 | { | 672 | { |
673 | XmlDocument xd = new XmlDocument(); | 673 | XmlDocument xd = new XmlDocument(); |
674 | xd.XmlResolver=null; | ||
674 | xd.LoadXml(rawXml); | 675 | xd.LoadXml(rawXml); |
675 | 676 | ||
676 | StringBuilder sb = new StringBuilder(); | 677 | StringBuilder sb = new StringBuilder(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 5bca482..9f52a14 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -306,6 +306,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
306 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); | 306 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); |
307 | 307 | ||
308 | XmlDocument doc = new XmlDocument(); | 308 | XmlDocument doc = new XmlDocument(); |
309 | doc.XmlResolver=null; | ||
309 | string stateData = String.Empty; | 310 | string stateData = String.Empty; |
310 | 311 | ||
311 | IAttachmentsService attServ = m_scene.RequestModuleInterface<IAttachmentsService>(); | 312 | IAttachmentsService attServ = m_scene.RequestModuleInterface<IAttachmentsService>(); |
@@ -372,6 +373,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
372 | if (itemData.TryGetValue(attach.ItemID, out xmlData)) | 373 | if (itemData.TryGetValue(attach.ItemID, out xmlData)) |
373 | { | 374 | { |
374 | d = new XmlDocument(); | 375 | d = new XmlDocument(); |
376 | d.XmlResolver=null; | ||
375 | d.LoadXml(xmlData); | 377 | d.LoadXml(xmlData); |
376 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", attach.ItemID); | 378 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", attach.ItemID); |
377 | } | 379 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index cfa9581..013b416 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | |||
@@ -124,6 +124,8 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures | |||
124 | { | 124 | { |
125 | using(XmlTextReader sr = new XmlTextReader(s)) | 125 | using(XmlTextReader sr = new XmlTextReader(s)) |
126 | { | 126 | { |
127 | sr.DtdProcessing = DtdProcessing.Prohibit; | ||
128 | sr.XmlResolver = null; | ||
127 | sr.ReadStartElement("BakedAppearance"); | 129 | sr.ReadStartElement("BakedAppearance"); |
128 | while(sr.LocalName == "BakedTexture") | 130 | while(sr.LocalName == "BakedTexture") |
129 | { | 131 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs index 8f12331..01c5d3b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs | |||
@@ -93,6 +93,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
93 | Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID); | 93 | Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID); |
94 | string xmlData = Utils.BytesToString(ncAssetGet.Data); | 94 | string xmlData = Utils.BytesToString(ncAssetGet.Data); |
95 | XmlDocument ncAssetGetXmlDoc = new XmlDocument(); | 95 | XmlDocument ncAssetGetXmlDoc = new XmlDocument(); |
96 | ncAssetGetXmlDoc.XmlResolver=null; | ||
96 | ncAssetGetXmlDoc.LoadXml(xmlData); | 97 | ncAssetGetXmlDoc.LoadXml(xmlData); |
97 | 98 | ||
98 | // Console.WriteLine(ncAssetGetXmlDoc.OuterXml); | 99 | // Console.WriteLine(ncAssetGetXmlDoc.OuterXml); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs index 833d883..37b30aa 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes; | |||
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | 41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MuteList |
42 | { | 42 | { |
43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalMuteListServicesConnector")] | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalMuteListServicesConnector")] |
44 | public class LocalMuteListServicesConnector : ISharedRegionModule, IMuteListService | 44 | public class LocalMuteListServicesConnector : ISharedRegionModule, IMuteListService |
@@ -66,7 +66,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | |||
66 | 66 | ||
67 | public void Initialise(IConfigSource source) | 67 | public void Initialise(IConfigSource source) |
68 | { | 68 | { |
69 | IConfig moduleConfig = source.Configs["Modules"]; | 69 | // only active for core mute lists module |
70 | IConfig moduleConfig = source.Configs["Messaging"]; | ||
71 | if (moduleConfig == null) | ||
72 | return; | ||
73 | |||
74 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModuleTst") | ||
75 | return; | ||
76 | |||
77 | moduleConfig = source.Configs["Modules"]; | ||
70 | 78 | ||
71 | if (moduleConfig == null) | 79 | if (moduleConfig == null) |
72 | return; | 80 | return; |
@@ -99,7 +107,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Land | |||
99 | catch | 107 | catch |
100 | { | 108 | { |
101 | m_log.Error("[MuteList LOCALCONNECTOR]: Failed to load mute service"); | 109 | m_log.Error("[MuteList LOCALCONNECTOR]: Failed to load mute service"); |
102 | return; | 110 | return; |
103 | } | 111 | } |
104 | 112 | ||
105 | if (m_service == null) | 113 | if (m_service == null) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs new file mode 100644 index 0000000..a5dec64 --- /dev/null +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs | |||
@@ -0,0 +1,143 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Reflection; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Region.Framework.Interfaces; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | using OpenSim.Server.Base; | ||
34 | using OpenSim.Services.Interfaces; | ||
35 | using OpenSim.Services.Connectors; | ||
36 | |||
37 | using OpenMetaverse; | ||
38 | using log4net; | ||
39 | using Mono.Addins; | ||
40 | using Nini.Config; | ||
41 | |||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MuteList | ||
43 | { | ||
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemoteMuteListServicesConnector")] | ||
45 | public class RemoteMuteListServicesConnector : ISharedRegionModule, IMuteListService | ||
46 | { | ||
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
49 | #region ISharedRegionModule | ||
50 | |||
51 | private bool m_Enabled = false; | ||
52 | |||
53 | private IMuteListService m_remoteConnector; | ||
54 | |||
55 | public Type ReplaceableInterface | ||
56 | { | ||
57 | get { return null; } | ||
58 | } | ||
59 | |||
60 | public string Name | ||
61 | { | ||
62 | get { return "RemoteMuteListServicesConnector"; } | ||
63 | } | ||
64 | |||
65 | public void Initialise(IConfigSource source) | ||
66 | { | ||
67 | // only active for core mute lists module | ||
68 | IConfig moduleConfig = source.Configs["Messaging"]; | ||
69 | if (moduleConfig == null) | ||
70 | return; | ||
71 | |||
72 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModuleTst") | ||
73 | return; | ||
74 | |||
75 | moduleConfig = source.Configs["Modules"]; | ||
76 | if (moduleConfig != null) | ||
77 | { | ||
78 | string name = moduleConfig.GetString("MuteListService", ""); | ||
79 | if (name == Name) | ||
80 | { | ||
81 | m_remoteConnector = new MuteListServicesConnector(source); | ||
82 | m_Enabled = true; | ||
83 | } | ||
84 | } | ||
85 | } | ||
86 | |||
87 | public void PostInitialise() | ||
88 | { | ||
89 | } | ||
90 | |||
91 | public void Close() | ||
92 | { | ||
93 | } | ||
94 | |||
95 | public void AddRegion(Scene scene) | ||
96 | { | ||
97 | if (!m_Enabled) | ||
98 | return; | ||
99 | |||
100 | scene.RegisterModuleInterface<IMuteListService>(this); | ||
101 | m_log.InfoFormat("[MUTELIST CONNECTOR]: Enabled for region {0}", scene.RegionInfo.RegionName); | ||
102 | } | ||
103 | |||
104 | public void RemoveRegion(Scene scene) | ||
105 | { | ||
106 | if (!m_Enabled) | ||
107 | return; | ||
108 | } | ||
109 | |||
110 | public void RegionLoaded(Scene scene) | ||
111 | { | ||
112 | if (!m_Enabled) | ||
113 | return; | ||
114 | } | ||
115 | |||
116 | #endregion | ||
117 | |||
118 | #region IMuteListService | ||
119 | public Byte[] MuteListRequest(UUID agentID, uint crc) | ||
120 | { | ||
121 | if (!m_Enabled) | ||
122 | return null; | ||
123 | return m_remoteConnector.MuteListRequest(agentID, crc); | ||
124 | } | ||
125 | |||
126 | public bool UpdateMute(MuteData mute) | ||
127 | { | ||
128 | if (!m_Enabled) | ||
129 | return false; | ||
130 | return m_remoteConnector.UpdateMute(mute); | ||
131 | } | ||
132 | |||
133 | public bool RemoveMute(UUID agentID, UUID muteID, string muteName) | ||
134 | { | ||
135 | if (!m_Enabled) | ||
136 | return false; | ||
137 | return m_remoteConnector.RemoveMute(agentID, muteID, muteName); | ||
138 | } | ||
139 | |||
140 | #endregion IMuteListService | ||
141 | |||
142 | } | ||
143 | } | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 99ff9b5..63ebf86 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -1130,6 +1130,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1130 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); | 1130 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); |
1131 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); | 1131 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); |
1132 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); | 1132 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); |
1133 | xtr.DtdProcessing = DtdProcessing.Prohibit; | ||
1134 | xtr.XmlResolver = null; | ||
1133 | 1135 | ||
1134 | // Loaded metadata will be empty if no information exists in the archive | 1136 | // Loaded metadata will be empty if no information exists in the archive |
1135 | dearchivedScenes.LoadedCreationDateTime = 0; | 1137 | dearchivedScenes.LoadedCreationDateTime = 0; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 8c0ef88..92c935b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | |||
@@ -93,6 +93,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
93 | 93 | ||
94 | StringReader sr = new StringReader(xml); | 94 | StringReader sr = new StringReader(xml); |
95 | XmlTextReader reader = new XmlTextReader(sr); | 95 | XmlTextReader reader = new XmlTextReader(sr); |
96 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
97 | reader.XmlResolver = null; | ||
96 | 98 | ||
97 | reader.ReadStartElement("assets"); | 99 | reader.ReadStartElement("assets"); |
98 | reader.Read(); | 100 | reader.Read(); |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs index 65f464a..52a80d6 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
69 | MemoryStream stream = new MemoryStream(); | 69 | MemoryStream stream = new MemoryStream(); |
70 | XmlTextWriter formatter = new XmlTextWriter(stream, Encoding.UTF8); | 70 | XmlTextWriter formatter = new XmlTextWriter(stream, Encoding.UTF8); |
71 | XmlDocument doc = new XmlDocument(); | 71 | XmlDocument doc = new XmlDocument(); |
72 | 72 | doc.XmlResolver=null; | |
73 | doc.LoadXml(xmlstream); | 73 | doc.LoadXml(xmlstream); |
74 | formatter.Formatting = Formatting.Indented; | 74 | formatter.Formatting = Formatting.Indented; |
75 | doc.WriteContentTo(formatter); | 75 | doc.WriteContentTo(formatter); |
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs index b8db3a9..38ab934 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs | |||
@@ -58,7 +58,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
58 | 58 | ||
59 | using (XmlTextReader reader = new XmlTextReader(path)) | 59 | using (XmlTextReader reader = new XmlTextReader(path)) |
60 | { | 60 | { |
61 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
62 | reader.XmlResolver = null; | ||
61 | XmlDocument doc = new XmlDocument(); | 63 | XmlDocument doc = new XmlDocument(); |
64 | doc.XmlResolver = null; | ||
65 | |||
62 | doc.Load(reader); | 66 | doc.Load(reader); |
63 | // if (doc.DocumentElement != null) | 67 | // if (doc.DocumentElement != null) |
64 | // { | 68 | // { |
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs index 351eda3..22734b3 100644 --- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs +++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs | |||
@@ -593,6 +593,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
593 | UTF8Encoding enc = new UTF8Encoding(); | 593 | UTF8Encoding enc = new UTF8Encoding(); |
594 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); | 594 | MemoryStream ms = new MemoryStream(enc.GetBytes(text)); |
595 | XmlTextReader xreader = new XmlTextReader(ms); | 595 | XmlTextReader xreader = new XmlTextReader(ms); |
596 | xreader.DtdProcessing = DtdProcessing.Prohibit; | ||
597 | xreader.XmlResolver = null; | ||
596 | 598 | ||
597 | SOPVehicle v = new SOPVehicle(); | 599 | SOPVehicle v = new SOPVehicle(); |
598 | bool error; | 600 | bool error; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f29cdf4..84367df 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2389,7 +2389,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2389 | { | 2389 | { |
2390 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) | 2390 | using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) |
2391 | { | 2391 | { |
2392 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 2392 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
2393 | { | 2393 | { |
2394 | reader.Read(); | 2394 | reader.Read(); |
2395 | bool isSingleObject = reader.Name != "CoalescedObject"; | 2395 | bool isSingleObject = reader.Name != "CoalescedObject"; |
@@ -2420,6 +2420,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2420 | else | 2420 | else |
2421 | { | 2421 | { |
2422 | XmlDocument doc = new XmlDocument(); | 2422 | XmlDocument doc = new XmlDocument(); |
2423 | doc.XmlResolver=null; | ||
2423 | doc.LoadXml(xmlData); | 2424 | doc.LoadXml(xmlData); |
2424 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 2425 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
2425 | XmlElement coll = (XmlElement)e; | 2426 | XmlElement coll = (XmlElement)e; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index bf217a5..c20c81d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -505,6 +505,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
505 | foreach (KeyValuePair<UUID, string> state in states) | 505 | foreach (KeyValuePair<UUID, string> state in states) |
506 | { | 506 | { |
507 | XmlDocument sdoc = new XmlDocument(); | 507 | XmlDocument sdoc = new XmlDocument(); |
508 | sdoc.XmlResolver=null; | ||
508 | sdoc.LoadXml(state.Value); | 509 | sdoc.LoadXml(state.Value); |
509 | XmlNodeList rootL = sdoc.GetElementsByTagName("State"); | 510 | XmlNodeList rootL = sdoc.GetElementsByTagName("State"); |
510 | XmlNode rootNode = rootL[0]; | 511 | XmlNode rootNode = rootL[0]; |
@@ -540,6 +541,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
540 | return; | 541 | return; |
541 | 542 | ||
542 | XmlDocument doc = new XmlDocument(); | 543 | XmlDocument doc = new XmlDocument(); |
544 | doc.XmlResolver=null; | ||
543 | try | 545 | try |
544 | { | 546 | { |
545 | doc.LoadXml(objXMLData); | 547 | doc.LoadXml(objXMLData); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3380191..21311b0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1994,6 +1994,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1994 | public void SaveScriptedState(XmlTextWriter writer, bool oldIDs) | 1994 | public void SaveScriptedState(XmlTextWriter writer, bool oldIDs) |
1995 | { | 1995 | { |
1996 | XmlDocument doc = new XmlDocument(); | 1996 | XmlDocument doc = new XmlDocument(); |
1997 | doc.XmlResolver=null; | ||
1997 | Dictionary<UUID,string> states = new Dictionary<UUID,string>(); | 1998 | Dictionary<UUID,string> states = new Dictionary<UUID,string>(); |
1998 | 1999 | ||
1999 | SceneObjectPart[] parts = m_parts.GetArray(); | 2000 | SceneObjectPart[] parts = m_parts.GetArray(); |
@@ -2782,7 +2783,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2782 | return RootPart.Torque; | 2783 | return RootPart.Torque; |
2783 | } | 2784 | } |
2784 | 2785 | ||
2785 | // This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object | 2786 | // This is used by llMoveToTarget() in an attached object |
2786 | public void MoveToTarget(Vector3 target, float tau) | 2787 | public void MoveToTarget(Vector3 target, float tau) |
2787 | { | 2788 | { |
2788 | if (IsAttachment) | 2789 | if (IsAttachment) |
@@ -2790,7 +2791,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2790 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); | 2791 | ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); |
2791 | 2792 | ||
2792 | if (avatar != null) | 2793 | if (avatar != null) |
2793 | avatar.MoveToTarget(target, false, false); | 2794 | avatar.MoveToTarget(target, false, false, tau); |
2794 | } | 2795 | } |
2795 | else | 2796 | else |
2796 | { | 2797 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index b22bda0..0b8cc7f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
455 | if (m_part.ParentGroup.m_savedScriptState.ContainsKey(stateID)) | 455 | if (m_part.ParentGroup.m_savedScriptState.ContainsKey(stateID)) |
456 | { | 456 | { |
457 | XmlDocument doc = new XmlDocument(); | 457 | XmlDocument doc = new XmlDocument(); |
458 | 458 | doc.XmlResolver=null; | |
459 | doc.LoadXml(m_part.ParentGroup.m_savedScriptState[stateID]); | 459 | doc.LoadXml(m_part.ParentGroup.m_savedScriptState[stateID]); |
460 | 460 | ||
461 | ////////// CRUFT WARNING /////////////////////////////////// | 461 | ////////// CRUFT WARNING /////////////////////////////////// |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6bce406..e10e787 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -101,7 +101,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
101 | public bool IsGod { get; set; } | 101 | public bool IsGod { get; set; } |
102 | 102 | ||
103 | private PresenceType m_presenceType; | 103 | private PresenceType m_presenceType; |
104 | public PresenceType PresenceType { | 104 | public PresenceType PresenceType |
105 | { | ||
105 | get {return m_presenceType;} | 106 | get {return m_presenceType;} |
106 | private set | 107 | private set |
107 | { | 108 | { |
@@ -368,8 +369,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
368 | private Quaternion m_headrotation = Quaternion.Identity; | 369 | private Quaternion m_headrotation = Quaternion.Identity; |
369 | 370 | ||
370 | //PauPaw:Proper PID Controler for autopilot************ | 371 | //PauPaw:Proper PID Controler for autopilot************ |
371 | public bool MovingToTarget { get; private set; } | 372 | |
372 | public Vector3 MoveToPositionTarget { get; private set; } | 373 | private bool m_movingToTarget; |
374 | public bool MovingToTarget | ||
375 | { | ||
376 | get {return m_movingToTarget;} | ||
377 | private set {m_movingToTarget = value; } | ||
378 | } | ||
379 | |||
380 | private Vector3 m_moveToPositionTarget; | ||
381 | public Vector3 MoveToPositionTarget | ||
382 | { | ||
383 | get {return m_moveToPositionTarget;} | ||
384 | private set {m_moveToPositionTarget = value; } | ||
385 | } | ||
386 | |||
387 | private float m_moveToSpeed; | ||
388 | public float MoveToSpeed | ||
389 | { | ||
390 | get {return m_moveToSpeed;} | ||
391 | private set {m_moveToSpeed = value; } | ||
392 | } | ||
393 | |||
373 | private double m_delayedStop = -1.0; | 394 | private double m_delayedStop = -1.0; |
374 | 395 | ||
375 | /// <summary> | 396 | /// <summary> |
@@ -1160,7 +1181,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1160 | ControllingClient.OnStopAnim += HandleStopAnim; | 1181 | ControllingClient.OnStopAnim += HandleStopAnim; |
1161 | ControllingClient.OnChangeAnim += avnHandleChangeAnim; | 1182 | ControllingClient.OnChangeAnim += avnHandleChangeAnim; |
1162 | ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; | 1183 | ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; |
1163 | ControllingClient.OnAutoPilotGo += MoveToTarget; | 1184 | ControllingClient.OnAutoPilotGo += MoveToTargetHandle; |
1164 | ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; | 1185 | ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; |
1165 | // ControllingClient.OnAgentFOV += HandleAgentFOV; | 1186 | // ControllingClient.OnAgentFOV += HandleAgentFOV; |
1166 | 1187 | ||
@@ -1180,7 +1201,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1180 | ControllingClient.OnStopAnim -= HandleStopAnim; | 1201 | ControllingClient.OnStopAnim -= HandleStopAnim; |
1181 | ControllingClient.OnChangeAnim -= avnHandleChangeAnim; | 1202 | ControllingClient.OnChangeAnim -= avnHandleChangeAnim; |
1182 | ControllingClient.OnForceReleaseControls -= HandleForceReleaseControls; | 1203 | ControllingClient.OnForceReleaseControls -= HandleForceReleaseControls; |
1183 | ControllingClient.OnAutoPilotGo -= MoveToTarget; | 1204 | ControllingClient.OnAutoPilotGo -= MoveToTargetHandle; |
1184 | ControllingClient.OnUpdateThrottles -= RaiseUpdateThrottles; | 1205 | ControllingClient.OnUpdateThrottles -= RaiseUpdateThrottles; |
1185 | // ControllingClient.OnAgentFOV += HandleAgentFOV; | 1206 | // ControllingClient.OnAgentFOV += HandleAgentFOV; |
1186 | } | 1207 | } |
@@ -2587,11 +2608,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2587 | } | 2608 | } |
2588 | 2609 | ||
2589 | bool update_movementflag = false; | 2610 | bool update_movementflag = false; |
2590 | bool mvToTarget = MovingToTarget; | 2611 | bool mvToTarget = m_movingToTarget; |
2591 | if (agentData.UseClientAgentPosition) | 2612 | if (agentData.UseClientAgentPosition) |
2592 | { | 2613 | { |
2593 | MovingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).LengthSquared() > 0.04f; | 2614 | m_movingToTarget = (agentData.ClientAgentPosition - AbsolutePosition).LengthSquared() > 0.04f; |
2594 | MoveToPositionTarget = agentData.ClientAgentPosition; | 2615 | m_moveToPositionTarget = agentData.ClientAgentPosition; |
2616 | m_moveToSpeed = -1f; | ||
2595 | } | 2617 | } |
2596 | 2618 | ||
2597 | int i = 0; | 2619 | int i = 0; |
@@ -2686,7 +2708,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2686 | update_movementflag = true; | 2708 | update_movementflag = true; |
2687 | } | 2709 | } |
2688 | 2710 | ||
2689 | if (MovingToTarget) | 2711 | if (m_movingToTarget) |
2690 | { | 2712 | { |
2691 | // If the user has pressed a key then we want to cancel any move to target. | 2713 | // If the user has pressed a key then we want to cancel any move to target. |
2692 | if (DCFlagKeyPressed) | 2714 | if (DCFlagKeyPressed) |
@@ -2787,7 +2809,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2787 | } | 2809 | } |
2788 | else | 2810 | else |
2789 | { | 2811 | { |
2790 | if(MovingToTarget || | 2812 | if(m_movingToTarget || |
2791 | (Animator.currentControlState != ScenePresenceAnimator.motionControlStates.flying && | 2813 | (Animator.currentControlState != ScenePresenceAnimator.motionControlStates.flying && |
2792 | Animator.currentControlState != ScenePresenceAnimator.motionControlStates.onsurface) | 2814 | Animator.currentControlState != ScenePresenceAnimator.motionControlStates.onsurface) |
2793 | ) | 2815 | ) |
@@ -2878,7 +2900,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2878 | 2900 | ||
2879 | bool updated = false; | 2901 | bool updated = false; |
2880 | 2902 | ||
2881 | Vector3 LocalVectorToTarget3D = MoveToPositionTarget - AbsolutePosition; | 2903 | Vector3 LocalVectorToTarget3D = m_moveToPositionTarget - AbsolutePosition; |
2882 | 2904 | ||
2883 | // m_log.DebugFormat( | 2905 | // m_log.DebugFormat( |
2884 | // "[SCENE PRESENCE]: bAllowUpdateMoveToPosition {0}, m_moveToPositionInProgress {1}, m_autopilotMoving {2}", | 2906 | // "[SCENE PRESENCE]: bAllowUpdateMoveToPosition {0}, m_moveToPositionInProgress {1}, m_autopilotMoving {2}", |
@@ -2891,9 +2913,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2891 | } | 2913 | } |
2892 | else | 2914 | else |
2893 | { | 2915 | { |
2894 | Vector3 hdist = LocalVectorToTarget3D; | 2916 | distanceToTarget = (float)Math.Sqrt(LocalVectorToTarget3D.X * LocalVectorToTarget3D.X + |
2895 | hdist.Z = 0; | 2917 | LocalVectorToTarget3D.Y * LocalVectorToTarget3D.Y); |
2896 | distanceToTarget = hdist.Length(); | ||
2897 | } | 2918 | } |
2898 | 2919 | ||
2899 | // m_log.DebugFormat( | 2920 | // m_log.DebugFormat( |
@@ -2905,128 +2926,126 @@ namespace OpenSim.Region.Framework.Scenes | |||
2905 | { | 2926 | { |
2906 | // We are close enough to the target | 2927 | // We are close enough to the target |
2907 | Velocity = Vector3.Zero; | 2928 | Velocity = Vector3.Zero; |
2908 | AbsolutePosition = MoveToPositionTarget; | 2929 | AbsolutePosition = m_moveToPositionTarget; |
2909 | if (Flying) | 2930 | if (Flying) |
2910 | { | 2931 | { |
2911 | if (LandAtTarget) | 2932 | if (LandAtTarget) |
2912 | Flying = false; | 2933 | Flying = false; |
2913 | 2934 | ||
2914 | // A horrible hack to stop the avatar dead in its tracks rather than having them overshoot | 2935 | // A horrible hack to stop the avatar dead in its tracks rather than having them overshoot |
2915 | // the target if flying. | 2936 | // the target if flying. |
2916 | // We really need to be more subtle (slow the avatar as it approaches the target) or at | 2937 | // We really need to be more subtle (slow the avatar as it approaches the target) or at |
2917 | // least be able to set collision status once, rather than 5 times to give it enough | 2938 | // least be able to set collision status once, rather than 5 times to give it enough |
2918 | // weighting so that that PhysicsActor thinks it really is colliding. | 2939 | // weighting so that that PhysicsActor thinks it really is colliding. |
2919 | for (int i = 0; i < 5; i++) | 2940 | for (int i = 0; i < 5; i++) |
2920 | IsColliding = true; | 2941 | IsColliding = true; |
2921 | } | 2942 | } |
2922 | ResetMoveToTarget(); | 2943 | ResetMoveToTarget(); |
2923 | return false; | 2944 | return false; |
2924 | } | 2945 | } |
2925 | else | ||
2926 | { | ||
2927 | try | ||
2928 | { | ||
2929 | // move avatar in 3D at one meter/second towards target, in avatar coordinate frame. | ||
2930 | // This movement vector gets added to the velocity through AddNewMovement(). | ||
2931 | // Theoretically we might need a more complex PID approach here if other | ||
2932 | // unknown forces are acting on the avatar and we need to adaptively respond | ||
2933 | // to such forces, but the following simple approach seems to works fine. | ||
2934 | |||
2935 | LocalVectorToTarget3D = LocalVectorToTarget3D * Quaternion.Inverse(Rotation); // change to avatar coords | ||
2936 | 2946 | ||
2937 | LocalVectorToTarget3D.Normalize(); | 2947 | if(m_moveToSpeed > 0 && distanceToTarget <= m_moveToSpeed * Scene.FrameTime) |
2938 | 2948 | m_moveToSpeed = distanceToTarget / Scene.FrameTime; | |
2939 | // update avatar movement flags. the avatar coordinate system is as follows: | ||
2940 | // | ||
2941 | // +X (forward) | ||
2942 | // | ||
2943 | // ^ | ||
2944 | // | | ||
2945 | // | | ||
2946 | // | | ||
2947 | // | | ||
2948 | // (left) +Y <--------o--------> -Y | ||
2949 | // avatar | ||
2950 | // | | ||
2951 | // | | ||
2952 | // | | ||
2953 | // | | ||
2954 | // v | ||
2955 | // -X | ||
2956 | // | ||
2957 | |||
2958 | // based on the above avatar coordinate system, classify the movement into | ||
2959 | // one of left/right/back/forward. | ||
2960 | |||
2961 | const uint noMovFlagsMask = (uint)(~(Dir_ControlFlags.DIR_CONTROL_FLAG_BACK | | ||
2962 | Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD | Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT | | ||
2963 | Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT | Dir_ControlFlags.DIR_CONTROL_FLAG_UP | | ||
2964 | Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); | ||
2965 | |||
2966 | MovementFlag &= noMovFlagsMask; | ||
2967 | uint tmpAgentControlFlags = (uint)m_AgentControlFlags; | ||
2968 | tmpAgentControlFlags &= noMovFlagsMask; | ||
2969 | |||
2970 | if (LocalVectorToTarget3D.X < 0) //MoveBack | ||
2971 | { | ||
2972 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | ||
2973 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | ||
2974 | updated = true; | ||
2975 | } | ||
2976 | else if (LocalVectorToTarget3D.X > 0) //Move Forward | ||
2977 | { | ||
2978 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | ||
2979 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | ||
2980 | updated = true; | ||
2981 | } | ||
2982 | |||
2983 | if (LocalVectorToTarget3D.Y > 0) //MoveLeft | ||
2984 | { | ||
2985 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | ||
2986 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | ||
2987 | updated = true; | ||
2988 | } | ||
2989 | else if (LocalVectorToTarget3D.Y < 0) //MoveRight | ||
2990 | { | ||
2991 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | ||
2992 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | ||
2993 | updated = true; | ||
2994 | } | ||
2995 | |||
2996 | if (LocalVectorToTarget3D.Z > 0) //Up | ||
2997 | { | ||
2998 | // Don't set these flags for up or down - doing so will make the avatar crouch or | ||
2999 | // keep trying to jump even if walking along level ground | ||
3000 | //MovementFlag += (byte)(uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP; | ||
3001 | //AgentControlFlags | ||
3002 | //AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP; | ||
3003 | updated = true; | ||
3004 | } | ||
3005 | else if (LocalVectorToTarget3D.Z < 0) //Down | ||
3006 | { | ||
3007 | //MovementFlag += (byte)(uint)Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN; | ||
3008 | //AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN; | ||
3009 | updated = true; | ||
3010 | } | ||
3011 | 2949 | ||
2950 | try | ||
2951 | { | ||
2952 | // move avatar in 3D towards target, in avatar coordinate frame. | ||
2953 | // This movement vector gets added to the velocity through AddNewMovement(). | ||
2954 | // Theoretically we might need a more complex PID approach here if other | ||
2955 | // unknown forces are acting on the avatar and we need to adaptively respond | ||
2956 | // to such forces, but the following simple approach seems to works fine. | ||
2957 | |||
2958 | float angle = 0.5f * (float)Math.Atan2(LocalVectorToTarget3D.Y, LocalVectorToTarget3D.X); | ||
2959 | Quaternion rot = new Quaternion(0,0, (float)Math.Sin(angle),(float)Math.Cos(angle)); | ||
2960 | Rotation = rot; | ||
2961 | LocalVectorToTarget3D = LocalVectorToTarget3D * Quaternion.Inverse(rot); // change to avatar coords | ||
2962 | LocalVectorToTarget3D.Normalize(); | ||
2963 | |||
2964 | // update avatar movement flags. the avatar coordinate system is as follows: | ||
2965 | // | ||
2966 | // +X (forward) | ||
2967 | // | ||
2968 | // ^ | ||
2969 | // | | ||
2970 | // | | ||
2971 | // | | ||
2972 | // | | ||
2973 | // (left) +Y <--------o--------> -Y | ||
2974 | // avatar | ||
2975 | // | | ||
2976 | // | | ||
2977 | // | | ||
2978 | // | | ||
2979 | // v | ||
2980 | // -X | ||
2981 | // | ||
2982 | |||
2983 | // based on the above avatar coordinate system, classify the movement into | ||
2984 | // one of left/right/back/forward. | ||
2985 | |||
2986 | const uint noMovFlagsMask = (uint)(~(Dir_ControlFlags.DIR_CONTROL_FLAG_BACK | | ||
2987 | Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD | Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT | | ||
2988 | Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT | Dir_ControlFlags.DIR_CONTROL_FLAG_UP | | ||
2989 | Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); | ||
2990 | |||
2991 | MovementFlag &= noMovFlagsMask; | ||
2992 | uint tmpAgentControlFlags = (uint)m_AgentControlFlags; | ||
2993 | tmpAgentControlFlags &= noMovFlagsMask; | ||
2994 | |||
2995 | if (LocalVectorToTarget3D.X < 0) //MoveBack | ||
2996 | { | ||
2997 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | ||
2998 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; | ||
2999 | updated = true; | ||
3000 | } | ||
3001 | else if (LocalVectorToTarget3D.X > 0) //Move Forward | ||
3002 | { | ||
3003 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | ||
3004 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; | ||
3005 | updated = true; | ||
3006 | } | ||
3007 | |||
3008 | if (LocalVectorToTarget3D.Y > 0) //MoveLeft | ||
3009 | { | ||
3010 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | ||
3011 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; | ||
3012 | updated = true; | ||
3013 | } | ||
3014 | else if (LocalVectorToTarget3D.Y < 0) //MoveRight | ||
3015 | { | ||
3016 | MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | ||
3017 | tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; | ||
3018 | updated = true; | ||
3019 | } | ||
3020 | |||
3021 | if (LocalVectorToTarget3D.Z > 0) //Up | ||
3022 | updated = true; | ||
3023 | |||
3024 | else if (LocalVectorToTarget3D.Z < 0) //Down | ||
3025 | updated = true; | ||
3026 | |||
3012 | // m_log.DebugFormat( | 3027 | // m_log.DebugFormat( |
3013 | // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", | 3028 | // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", |
3014 | // LocalVectorToTarget3D, agent_control_v3, Name); | 3029 | // LocalVectorToTarget3D, agent_control_v3, Name); |
3015 | 3030 | ||
3016 | m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags; | 3031 | m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags; |
3032 | if(updated) | ||
3017 | agent_control_v3 += LocalVectorToTarget3D; | 3033 | agent_control_v3 += LocalVectorToTarget3D; |
3018 | } | 3034 | } |
3019 | catch (Exception e) | 3035 | catch (Exception e) |
3020 | { | 3036 | { |
3021 | //Avoid system crash, can be slower but... | 3037 | //Avoid system crash, can be slower but... |
3022 | m_log.DebugFormat("Crash! {0}", e.ToString()); | 3038 | m_log.DebugFormat("Crash! {0}", e.ToString()); |
3023 | } | ||
3024 | } | 3039 | } |
3025 | 3040 | ||
3026 | return updated; | 3041 | return updated; |
3027 | // AddNewMovement(agent_control_v3); | 3042 | // AddNewMovement(agent_control_v3); |
3028 | } | 3043 | } |
3029 | 3044 | ||
3045 | public void MoveToTargetHandle(Vector3 pos, bool noFly, bool landAtTarget) | ||
3046 | { | ||
3047 | MoveToTarget(pos, noFly, landAtTarget); | ||
3048 | } | ||
3030 | /// <summary> | 3049 | /// <summary> |
3031 | /// Move to the given target over time. | 3050 | /// Move to the given target over time. |
3032 | /// </summary> | 3051 | /// </summary> |
@@ -3039,8 +3058,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3039 | /// <param name="landAtTarget"> | 3058 | /// <param name="landAtTarget"> |
3040 | /// If true and the avatar starts flying during the move then land at the target. | 3059 | /// If true and the avatar starts flying during the move then land at the target. |
3041 | /// </param> | 3060 | /// </param> |
3042 | public void MoveToTarget(Vector3 pos, bool noFly, bool landAtTarget) | 3061 | public void MoveToTarget(Vector3 pos, bool noFly, bool landAtTarget, float tau = -1f) |
3043 | { | 3062 | { |
3044 | m_delayedStop = -1; | 3063 | m_delayedStop = -1; |
3045 | 3064 | ||
3046 | if (SitGround) | 3065 | if (SitGround) |
@@ -3073,30 +3092,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
3073 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", | 3092 | // "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", |
3074 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); | 3093 | // Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); |
3075 | 3094 | ||
3095 | terrainHeight += Appearance.AvatarHeight; // so 1.5 * AvatarHeight above ground at target | ||
3076 | bool shouldfly = Flying; | 3096 | bool shouldfly = Flying; |
3077 | if (noFly) | 3097 | if (noFly) |
3078 | shouldfly = false; | 3098 | shouldfly = false; |
3079 | else if (pos.Z > terrainHeight || Flying) | 3099 | else if (pos.Z > terrainHeight || Flying) |
3080 | shouldfly = true; | 3100 | shouldfly = true; |
3081 | 3101 | ||
3082 | LandAtTarget = landAtTarget; | ||
3083 | MovingToTarget = true; | ||
3084 | MoveToPositionTarget = pos; | ||
3085 | Flying = shouldfly; | ||
3086 | |||
3087 | // Rotate presence around the z-axis to point in same direction as movement. | ||
3088 | // Ignore z component of vector | ||
3089 | Vector3 localVectorToTarget3D = pos - AbsolutePosition; | 3102 | Vector3 localVectorToTarget3D = pos - AbsolutePosition; |
3090 | 3103 | ||
3091 | // m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y); | 3104 | // m_log.DebugFormat("[SCENE PRESENCE]: Local vector to target is {0},[1}", localVectorToTarget3D.X,localVectorToTarget3D.Y); |
3105 | |||
3106 | m_movingToTarget = true; | ||
3107 | LandAtTarget = landAtTarget; | ||
3108 | m_moveToPositionTarget = pos; | ||
3109 | if(tau > 0) | ||
3110 | { | ||
3111 | if(tau < Scene.FrameTime) | ||
3112 | tau = Scene.FrameTime; | ||
3113 | m_moveToSpeed = localVectorToTarget3D.Length() / tau; | ||
3114 | if(m_moveToSpeed < 0.5f) //to tune | ||
3115 | m_moveToSpeed = 0.5f; | ||
3116 | else if(m_moveToSpeed > 50f) | ||
3117 | m_moveToSpeed = 50f; | ||
3092 | 3118 | ||
3093 | // Calculate the yaw. | 3119 | SetAlwaysRun = false; |
3094 | Vector3 angle = new Vector3(0, 0, (float)(Math.Atan2(localVectorToTarget3D.Y, localVectorToTarget3D.X))); | 3120 | } |
3095 | 3121 | else | |
3096 | // m_log.DebugFormat("[SCENE PRESENCE]: Angle is {0}", angle); | 3122 | m_moveToSpeed = 4.096f * m_speedModifier; |
3097 | 3123 | ||
3098 | Rotation = Quaternion.CreateFromEulers(angle); | 3124 | Flying = shouldfly; |
3099 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); | ||
3100 | 3125 | ||
3101 | Vector3 control = Vector3.Zero; | 3126 | Vector3 control = Vector3.Zero; |
3102 | if(HandleMoveToTargetUpdate(1f, ref control)) | 3127 | if(HandleMoveToTargetUpdate(1f, ref control)) |
@@ -3110,7 +3135,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3110 | { | 3135 | { |
3111 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting move to target for {0}", Name); | 3136 | // m_log.DebugFormat("[SCENE PRESENCE]: Resetting move to target for {0}", Name); |
3112 | 3137 | ||
3113 | MovingToTarget = false; | 3138 | m_movingToTarget = false; |
3139 | m_moveToSpeed = -1f; | ||
3114 | // MoveToPositionTarget = Vector3.Zero; | 3140 | // MoveToPositionTarget = Vector3.Zero; |
3115 | // lock(m_forceToApplyLock) | 3141 | // lock(m_forceToApplyLock) |
3116 | // m_forceToApplyValid = false; // cancel possible last action | 3142 | // m_forceToApplyValid = false; // cancel possible last action |
@@ -3294,7 +3320,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3294 | RemoveFromPhysicalScene(); | 3320 | RemoveFromPhysicalScene(); |
3295 | } | 3321 | } |
3296 | 3322 | ||
3297 | if (MovingToTarget) | 3323 | if (m_movingToTarget) |
3298 | ResetMoveToTarget(); | 3324 | ResetMoveToTarget(); |
3299 | 3325 | ||
3300 | Velocity = Vector3.Zero; | 3326 | Velocity = Vector3.Zero; |
@@ -3436,7 +3462,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3436 | 3462 | ||
3437 | RemoveFromPhysicalScene(); | 3463 | RemoveFromPhysicalScene(); |
3438 | 3464 | ||
3439 | if (MovingToTarget) | 3465 | if (m_movingToTarget) |
3440 | ResetMoveToTarget(); | 3466 | ResetMoveToTarget(); |
3441 | 3467 | ||
3442 | Velocity = Vector3.Zero; | 3468 | Velocity = Vector3.Zero; |
@@ -3716,8 +3742,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3716 | if ((vec.Z == 0f) && !Flying) | 3742 | if ((vec.Z == 0f) && !Flying) |
3717 | direc.Z = 0f; // Prevent camera WASD up. | 3743 | direc.Z = 0f; // Prevent camera WASD up. |
3718 | 3744 | ||
3745 | bool notmvtrgt = !m_movingToTarget || m_moveToSpeed <= 0; | ||
3719 | // odd rescalings | 3746 | // odd rescalings |
3720 | direc *= 0.032f * 128f * SpeedModifier * thisAddSpeedModifier; | 3747 | if(notmvtrgt) |
3748 | direc *= 4.096f * SpeedModifier * thisAddSpeedModifier; | ||
3749 | else | ||
3750 | direc *= m_moveToSpeed; | ||
3721 | 3751 | ||
3722 | // m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name); | 3752 | // m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name); |
3723 | 3753 | ||
@@ -3735,12 +3765,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3735 | // landing situation, prevent avatar moving or it may fail to land | 3765 | // landing situation, prevent avatar moving or it may fail to land |
3736 | // animator will handle this condition and do the land | 3766 | // animator will handle this condition and do the land |
3737 | direc = Vector3.Zero; | 3767 | direc = Vector3.Zero; |
3738 | else | 3768 | else if(notmvtrgt) |
3739 | direc *= 4.0f; | 3769 | direc *= 4.0f; |
3740 | } | 3770 | } |
3741 | else if (IsColliding) | 3771 | else if (IsColliding) |
3742 | { | 3772 | { |
3743 | if (direc.Z > 2.0f) // reinforce jumps | 3773 | if (direc.Z > 2.0f && notmvtrgt) // reinforce jumps |
3744 | { | 3774 | { |
3745 | direc.Z *= 2.6f; | 3775 | direc.Z *= 2.6f; |
3746 | } | 3776 | } |
@@ -3780,7 +3810,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3780 | if (IsInTransit || IsLoggingIn) | 3810 | if (IsInTransit || IsLoggingIn) |
3781 | return; | 3811 | return; |
3782 | 3812 | ||
3783 | if(MovingToTarget) | 3813 | if(m_movingToTarget) |
3784 | { | 3814 | { |
3785 | m_delayedStop = -1; | 3815 | m_delayedStop = -1; |
3786 | Vector3 control = Vector3.Zero; | 3816 | Vector3 control = Vector3.Zero; |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index 41f3ef4..c3bc4a0 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs | |||
@@ -133,6 +133,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
133 | { | 133 | { |
134 | using (XmlTextReader reader = new XmlTextReader(sr)) | 134 | using (XmlTextReader reader = new XmlTextReader(sr)) |
135 | { | 135 | { |
136 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
137 | reader.XmlResolver = null; | ||
138 | |||
136 | reader.MoveToContent(); // skip possible xml declaration | 139 | reader.MoveToContent(); // skip possible xml declaration |
137 | 140 | ||
138 | if (reader.Name != "CoalescedObject") | 141 | if (reader.Name != "CoalescedObject") |
@@ -147,6 +150,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
147 | } | 150 | } |
148 | 151 | ||
149 | XmlDocument doc = new XmlDocument(); | 152 | XmlDocument doc = new XmlDocument(); |
153 | doc.XmlResolver=null; | ||
150 | doc.LoadXml(xml); | 154 | doc.LoadXml(xml); |
151 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 155 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
152 | if (e == null) | 156 | if (e == null) |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 82bbe6f..a2d512a 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
63 | String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData); | 63 | String fixedData = ExternalRepresentationUtils.SanitizeXml(xmlData); |
64 | using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null)) | 64 | using (XmlTextReader wrappedReader = new XmlTextReader(fixedData, XmlNodeType.Element, null)) |
65 | { | 65 | { |
66 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment })) | 66 | using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment, DtdProcessing = DtdProcessing.Prohibit, XmlResolver = null })) |
67 | { | 67 | { |
68 | try | 68 | try |
69 | { | 69 | { |
@@ -255,6 +255,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
255 | try | 255 | try |
256 | { | 256 | { |
257 | XmlDocument doc = new XmlDocument(); | 257 | XmlDocument doc = new XmlDocument(); |
258 | doc.XmlResolver=null; | ||
258 | doc.LoadXml(xmlData); | 259 | doc.LoadXml(xmlData); |
259 | 260 | ||
260 | XmlNodeList parts = doc.GetElementsByTagName("SceneObjectPart"); | 261 | XmlNodeList parts = doc.GetElementsByTagName("SceneObjectPart"); |
@@ -266,18 +267,29 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
266 | return null; | 267 | return null; |
267 | } | 268 | } |
268 | 269 | ||
269 | StringReader sr = new StringReader(parts[0].OuterXml); | 270 | SceneObjectGroup sceneObject; |
270 | XmlTextReader reader = new XmlTextReader(sr); | 271 | using(StringReader sr = new StringReader(parts[0].OuterXml)) |
271 | SceneObjectGroup sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); | 272 | { |
272 | reader.Close(); | 273 | using(XmlTextReader reader = new XmlTextReader(sr)) |
273 | sr.Close(); | 274 | { |
275 | reader.DtdProcessing = DtdProcessing.Prohibit; | ||
276 | reader.XmlResolver = null; | ||
277 | |||
278 | sceneObject = new SceneObjectGroup(SceneObjectPart.FromXml(reader)); | ||
279 | } | ||
280 | } | ||
274 | 281 | ||
275 | // Then deal with the rest | 282 | // Then deal with the rest |
283 | SceneObjectPart part; | ||
276 | for (int i = 1; i < parts.Count; i++) | 284 | for (int i = 1; i < parts.Count; i++) |
277 | { | 285 | { |
278 | sr = new StringReader(parts[i].OuterXml); | 286 | using(StringReader sr = new StringReader(parts[i].OuterXml)) |
279 | reader = new XmlTextReader(sr); | 287 | { |
280 | SceneObjectPart part = SceneObjectPart.FromXml(reader); | 288 | using(XmlTextReader reader = new XmlTextReader(sr)) |
289 | { | ||
290 | part = SceneObjectPart.FromXml(reader); | ||
291 | } | ||
292 | } | ||
281 | 293 | ||
282 | int originalLinkNum = part.LinkNum; | 294 | int originalLinkNum = part.LinkNum; |
283 | 295 | ||
@@ -288,8 +300,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
288 | if (originalLinkNum != 0) | 300 | if (originalLinkNum != 0) |
289 | part.LinkNum = originalLinkNum; | 301 | part.LinkNum = originalLinkNum; |
290 | 302 | ||
291 | reader.Close(); | ||
292 | sr.Close(); | ||
293 | } | 303 | } |
294 | 304 | ||
295 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); | 305 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index 34fdb6d..977dd73 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | |||
@@ -49,14 +49,19 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
49 | public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) | 49 | public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset) |
50 | { | 50 | { |
51 | XmlDocument doc = new XmlDocument(); | 51 | XmlDocument doc = new XmlDocument(); |
52 | doc.XmlResolver=null; | ||
52 | XmlNode rootNode; | 53 | XmlNode rootNode; |
53 | 54 | ||
54 | if (fileName.StartsWith("http:") || File.Exists(fileName)) | 55 | if (fileName.StartsWith("http:") || File.Exists(fileName)) |
55 | { | 56 | { |
56 | XmlTextReader reader = new XmlTextReader(fileName); | 57 | using(XmlTextReader reader = new XmlTextReader(fileName)) |
57 | reader.WhitespaceHandling = WhitespaceHandling.None; | 58 | { |
58 | doc.Load(reader); | 59 | reader.WhitespaceHandling = WhitespaceHandling.None; |
59 | reader.Close(); | 60 | reader.DtdProcessing = DtdProcessing.Prohibit; |
61 | reader.XmlResolver = null; | ||
62 | |||
63 | doc.Load(reader); | ||
64 | } | ||
60 | rootNode = doc.FirstChild; | 65 | rootNode = doc.FirstChild; |
61 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) | 66 | foreach (XmlNode aPrimNode in rootNode.ChildNodes) |
62 | { | 67 | { |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 89d78cf..1beca04 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs | |||
@@ -196,13 +196,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | // ITerrainChannel.LoadFromXmlString() | 196 | // ITerrainChannel.LoadFromXmlString() |
197 | public void LoadFromXmlString(string data) | 197 | public void LoadFromXmlString(string data) |
198 | { | 198 | { |
199 | StringReader sr = new StringReader(data); | 199 | using(StringReader sr = new StringReader(data)) |
200 | XmlTextReader reader = new XmlTextReader(sr); | 200 | { |
201 | reader.Read(); | 201 | using(XmlTextReader reader = new XmlTextReader(sr)) |
202 | 202 | { | |
203 | ReadXml(reader); | 203 | reader.DtdProcessing = DtdProcessing.Prohibit; |
204 | reader.Close(); | 204 | reader.XmlResolver = null; |
205 | sr.Close(); | 205 | ReadXml(reader); |
206 | } | ||
207 | } | ||
206 | } | 208 | } |
207 | 209 | ||
208 | // ITerrainChannel.Merge | 210 | // ITerrainChannel.Merge |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs index e5c847e..90c5197 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAutopilotTests.cs | |||
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
97 | Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z)); | 97 | Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z)); |
98 | Assert.That(sp.AbsolutePosition.Z, Is.LessThan(targetPos.X)); | 98 | Assert.That(sp.AbsolutePosition.Z, Is.LessThan(targetPos.X)); |
99 | 99 | ||
100 | m_scene.Update(10); | 100 | m_scene.Update(50); |
101 | 101 | ||
102 | double distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos); | 102 | double distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos); |
103 | Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on first move"); | 103 | Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on first move"); |
@@ -121,7 +121,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
121 | Assert.That(sp.AbsolutePosition.Y, Is.EqualTo(startPos.Y)); | 121 | Assert.That(sp.AbsolutePosition.Y, Is.EqualTo(startPos.Y)); |
122 | Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z)); | 122 | Assert.That(sp.AbsolutePosition.Z, Is.EqualTo(startPos.Z)); |
123 | 123 | ||
124 | m_scene.Update(10); | 124 | m_scene.Update(50); |
125 | 125 | ||
126 | distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos); | 126 | distanceToTarget = Util.GetDistanceTo(sp.AbsolutePosition, targetPos); |
127 | Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on second move"); | 127 | Assert.That(distanceToTarget, Is.LessThan(1), "Avatar not within 1 unit of target position on second move"); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 57930d7..08242b6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -1125,6 +1125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1125 | return null; | 1125 | return null; |
1126 | 1126 | ||
1127 | doc = new XmlDocument(); | 1127 | doc = new XmlDocument(); |
1128 | doc.XmlResolver = null; | ||
1128 | 1129 | ||
1129 | // Let's serialize all calls to Vivox. Most of these are driven by | 1130 | // Let's serialize all calls to Vivox. Most of these are driven by |
1130 | // the clients (CAPs), when the user arrives at the region. We don't | 1131 | // the clients (CAPs), when the user arrives at the region. We don't |
@@ -1146,7 +1147,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
1146 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) | 1147 | using (HttpWebResponse rsp = (HttpWebResponse)req.GetResponse()) |
1147 | using (Stream s = rsp.GetResponseStream()) | 1148 | using (Stream s = rsp.GetResponseStream()) |
1148 | using (XmlTextReader rdr = new XmlTextReader(s)) | 1149 | using (XmlTextReader rdr = new XmlTextReader(s)) |
1149 | doc.Load(rdr); | 1150 | { |
1151 | rdr.DtdProcessing = DtdProcessing.Prohibit; | ||
1152 | rdr.XmlResolver = null; | ||
1153 | doc.Load(rdr); | ||
1154 | } | ||
1150 | } | 1155 | } |
1151 | catch (Exception e) | 1156 | catch (Exception e) |
1152 | { | 1157 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs index bcdc7bf..cfe21fc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs | |||
@@ -207,6 +207,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
207 | public static void Deserialize(string xml, ScriptInstance instance) | 207 | public static void Deserialize(string xml, ScriptInstance instance) |
208 | { | 208 | { |
209 | XmlDocument doc = new XmlDocument(); | 209 | XmlDocument doc = new XmlDocument(); |
210 | doc.XmlResolver=null; | ||
210 | 211 | ||
211 | Dictionary<string, object> vars = instance.GetVars(); | 212 | Dictionary<string, object> vars = instance.GetVars(); |
212 | 213 | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 65ce61d..05124fc 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -2098,6 +2098,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
2098 | string xml = instance.GetXMLState(); | 2098 | string xml = instance.GetXMLState(); |
2099 | 2099 | ||
2100 | XmlDocument sdoc = new XmlDocument(); | 2100 | XmlDocument sdoc = new XmlDocument(); |
2101 | sdoc.XmlResolver=null; | ||
2101 | bool loadedState = true; | 2102 | bool loadedState = true; |
2102 | try | 2103 | try |
2103 | { | 2104 | { |
@@ -2253,6 +2254,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
2253 | return false; | 2254 | return false; |
2254 | 2255 | ||
2255 | XmlDocument doc = new XmlDocument(); | 2256 | XmlDocument doc = new XmlDocument(); |
2257 | doc.XmlResolver=null; | ||
2256 | 2258 | ||
2257 | try | 2259 | try |
2258 | { | 2260 | { |
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index d0043ba..cc506bc 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs | |||
@@ -513,7 +513,7 @@ namespace OpenSim.Server.Base | |||
513 | Dictionary<string, object> ret = new Dictionary<string, object>(); | 513 | Dictionary<string, object> ret = new Dictionary<string, object>(); |
514 | 514 | ||
515 | XmlDocument doc = new XmlDocument(); | 515 | XmlDocument doc = new XmlDocument(); |
516 | 516 | doc.XmlResolver = null; | |
517 | try | 517 | try |
518 | { | 518 | { |
519 | doc.LoadXml(data); | 519 | doc.LoadXml(data); |
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs index 1e29378..755272b 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerConnector.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.GridUser | |||
56 | Object[] args = new Object[] { config }; | 56 | Object[] args = new Object[] { config }; |
57 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(service, args); | 57 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(service, args); |
58 | 58 | ||
59 | IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); ; | 59 | IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); |
60 | 60 | ||
61 | server.AddStreamHandler(new GridUserServerPostHandler(m_GridUserService, auth)); | 61 | server.AddStreamHandler(new GridUserServerPostHandler(m_GridUserService, auth)); |
62 | } | 62 | } |
diff --git a/OpenSim/Server/Handlers/MuteList/MuteListServerConnector.cs b/OpenSim/Server/Handlers/MuteList/MuteListServerConnector.cs new file mode 100644 index 0000000..8d27f07 --- /dev/null +++ b/OpenSim/Server/Handlers/MuteList/MuteListServerConnector.cs | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using Nini.Config; | ||
30 | using OpenSim.Server.Base; | ||
31 | using OpenSim.Services.Interfaces; | ||
32 | using OpenSim.Framework.ServiceAuth; | ||
33 | using OpenSim.Framework.Servers.HttpServer; | ||
34 | using OpenSim.Server.Handlers.Base; | ||
35 | |||
36 | namespace OpenSim.Server.Handlers.GridUser | ||
37 | { | ||
38 | public class MuteListServiceConnector : ServiceConnector | ||
39 | { | ||
40 | private IMuteListService m_MuteListService; | ||
41 | private string m_ConfigName = "MuteListService"; | ||
42 | |||
43 | public MuteListServiceConnector(IConfigSource config, IHttpServer server, string configName) : | ||
44 | base(config, server, configName) | ||
45 | { | ||
46 | IConfig serverConfig = config.Configs[m_ConfigName]; | ||
47 | if (serverConfig == null) | ||
48 | throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); | ||
49 | |||
50 | string service = serverConfig.GetString("LocalServiceModule", String.Empty); | ||
51 | |||
52 | if (service == String.Empty) | ||
53 | throw new Exception("LocalServiceModule not present in MuteListService config file MuteListService section"); | ||
54 | |||
55 | Object[] args = new Object[] { config }; | ||
56 | m_MuteListService = ServerUtils.LoadPlugin<IMuteListService>(service, args); | ||
57 | |||
58 | IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); | ||
59 | |||
60 | server.AddStreamHandler(new MuteListServerPostHandler(m_MuteListService, auth)); | ||
61 | } | ||
62 | } | ||
63 | } | ||
diff --git a/OpenSim/Server/Handlers/MuteList/MuteListServerPostHandler.cs b/OpenSim/Server/Handlers/MuteList/MuteListServerPostHandler.cs new file mode 100644 index 0000000..26c4093 --- /dev/null +++ b/OpenSim/Server/Handlers/MuteList/MuteListServerPostHandler.cs | |||
@@ -0,0 +1,240 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using Nini.Config; | ||
29 | using log4net; | ||
30 | using System; | ||
31 | using System.Reflection; | ||
32 | using System.IO; | ||
33 | using System.Net; | ||
34 | using System.Text; | ||
35 | using System.Text.RegularExpressions; | ||
36 | using System.Xml; | ||
37 | using System.Xml.Serialization; | ||
38 | using System.Collections.Generic; | ||
39 | using OpenSim.Server.Base; | ||
40 | using OpenSim.Services.Interfaces; | ||
41 | using OpenSim.Framework; | ||
42 | using OpenSim.Framework.ServiceAuth; | ||
43 | using OpenSim.Framework.Servers.HttpServer; | ||
44 | using OpenMetaverse; | ||
45 | |||
46 | namespace OpenSim.Server.Handlers.GridUser | ||
47 | { | ||
48 | public class MuteListServerPostHandler : BaseStreamHandler | ||
49 | { | ||
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
51 | |||
52 | private IMuteListService m_service; | ||
53 | |||
54 | public MuteListServerPostHandler(IMuteListService service, IServiceAuth auth) : | ||
55 | base("POST", "/mutelist", auth) | ||
56 | { | ||
57 | m_service = service; | ||
58 | } | ||
59 | |||
60 | protected override byte[] ProcessRequest(string path, Stream requestData, | ||
61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | ||
62 | { | ||
63 | string body; | ||
64 | using(StreamReader sr = new StreamReader(requestData)) | ||
65 | body = sr.ReadToEnd(); | ||
66 | body = body.Trim(); | ||
67 | |||
68 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | ||
69 | string method = string.Empty; | ||
70 | |||
71 | try | ||
72 | { | ||
73 | Dictionary<string, object> request = | ||
74 | ServerUtils.ParseQueryString(body); | ||
75 | |||
76 | if (!request.ContainsKey("METHOD")) | ||
77 | return FailureResult(); | ||
78 | |||
79 | method = request["METHOD"].ToString(); | ||
80 | |||
81 | switch (method) | ||
82 | { | ||
83 | case "get": | ||
84 | return getmutes(request); | ||
85 | case "update": | ||
86 | return updatemute(request); | ||
87 | case "delete": | ||
88 | return deletemute(request); | ||
89 | } | ||
90 | m_log.DebugFormat("[MUTELIST HANDLER]: unknown method request: {0}", method); | ||
91 | } | ||
92 | catch (Exception e) | ||
93 | { | ||
94 | m_log.DebugFormat("[MUTELIST HANDLER]: Exception in method {0}: {1}", method, e); | ||
95 | } | ||
96 | |||
97 | return FailureResult(); | ||
98 | } | ||
99 | |||
100 | byte[] getmutes(Dictionary<string, object> request) | ||
101 | { | ||
102 | if(!request.ContainsKey("agentid") || !request.ContainsKey("mutecrc")) | ||
103 | return FailureResult(); | ||
104 | |||
105 | UUID agentID; | ||
106 | if(!UUID.TryParse(request["agentid"].ToString(), out agentID)) | ||
107 | return FailureResult(); | ||
108 | |||
109 | uint mutecrc; | ||
110 | if(!UInt32.TryParse(request["mutecrc"].ToString(), out mutecrc)) | ||
111 | return FailureResult(); | ||
112 | |||
113 | byte[] data = m_service.MuteListRequest(agentID, mutecrc); | ||
114 | |||
115 | Dictionary<string, object> result = new Dictionary<string, object>(); | ||
116 | result["result"] = Convert.ToBase64String(data); | ||
117 | |||
118 | string xmlString = ServerUtils.BuildXmlResponse(result); | ||
119 | |||
120 | //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); | ||
121 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
122 | } | ||
123 | |||
124 | byte[] updatemute(Dictionary<string, object> request) | ||
125 | { | ||
126 | if(!request.ContainsKey("agentid") || !request.ContainsKey("muteid")) | ||
127 | return FailureResult(); | ||
128 | |||
129 | MuteData mute = new MuteData(); | ||
130 | |||
131 | if( !UUID.TryParse(request["agentid"].ToString(), out mute.AgentID)) | ||
132 | return FailureResult(); | ||
133 | |||
134 | if(!UUID.TryParse(request["muteid"].ToString(), out mute.MuteID)) | ||
135 | return FailureResult(); | ||
136 | |||
137 | if(request.ContainsKey("mutename")) | ||
138 | { | ||
139 | mute.MuteName = request["mutename"].ToString(); | ||
140 | } | ||
141 | else | ||
142 | mute.MuteName = String.Empty; | ||
143 | |||
144 | if(request.ContainsKey("mutetype")) | ||
145 | { | ||
146 | if(!Int32.TryParse(request["mutetype"].ToString(), out mute.MuteType)) | ||
147 | return FailureResult(); | ||
148 | } | ||
149 | else | ||
150 | mute.MuteType = 0; | ||
151 | |||
152 | if(request.ContainsKey("muteflags")) | ||
153 | { | ||
154 | if(!Int32.TryParse(request["muteflags"].ToString(), out mute.MuteFlags)) | ||
155 | return FailureResult(); | ||
156 | } | ||
157 | else | ||
158 | mute.MuteFlags = 0; | ||
159 | |||
160 | if(request.ContainsKey("mutestamp")) | ||
161 | { | ||
162 | if(!Int32.TryParse(request["mutestamp"].ToString(), out mute.Stamp)) | ||
163 | return FailureResult(); | ||
164 | } | ||
165 | else | ||
166 | mute.Stamp = Util.UnixTimeSinceEpoch(); | ||
167 | |||
168 | return m_service.UpdateMute(mute) ? SuccessResult() : FailureResult(); | ||
169 | } | ||
170 | |||
171 | byte[] deletemute(Dictionary<string, object> request) | ||
172 | { | ||
173 | if(!request.ContainsKey("agentid") || !request.ContainsKey("muteid")) | ||
174 | return FailureResult(); | ||
175 | |||
176 | UUID agentID; | ||
177 | if( !UUID.TryParse(request["agentid"].ToString(), out agentID)) | ||
178 | return FailureResult(); | ||
179 | |||
180 | UUID muteID; | ||
181 | if(!UUID.TryParse(request["muteid"].ToString(), out muteID)) | ||
182 | return FailureResult(); | ||
183 | |||
184 | string muteName; | ||
185 | if(request.ContainsKey("mutename")) | ||
186 | { | ||
187 | muteName = request["mutename"].ToString(); | ||
188 | |||
189 | } | ||
190 | else | ||
191 | muteName = String.Empty; | ||
192 | |||
193 | return m_service.RemoveMute(agentID, muteID, muteName) ? SuccessResult() : FailureResult(); | ||
194 | } | ||
195 | |||
196 | private byte[] SuccessResult() | ||
197 | { | ||
198 | XmlDocument doc = new XmlDocument(); | ||
199 | |||
200 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, | ||
201 | "", ""); | ||
202 | |||
203 | doc.AppendChild(xmlnode); | ||
204 | |||
205 | XmlElement rootElement = doc.CreateElement("", "ServerResponse", | ||
206 | ""); | ||
207 | |||
208 | doc.AppendChild(rootElement); | ||
209 | |||
210 | XmlElement result = doc.CreateElement("", "result", ""); | ||
211 | result.AppendChild(doc.CreateTextNode("Success")); | ||
212 | |||
213 | rootElement.AppendChild(result); | ||
214 | |||
215 | return Util.DocToBytes(doc); | ||
216 | } | ||
217 | |||
218 | private byte[] FailureResult() | ||
219 | { | ||
220 | XmlDocument doc = new XmlDocument(); | ||
221 | |||
222 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, | ||
223 | "", ""); | ||
224 | |||
225 | doc.AppendChild(xmlnode); | ||
226 | |||
227 | XmlElement rootElement = doc.CreateElement("", "ServerResponse", | ||
228 | ""); | ||
229 | |||
230 | doc.AppendChild(rootElement); | ||
231 | |||
232 | XmlElement result = doc.CreateElement("", "result", ""); | ||
233 | result.AppendChild(doc.CreateTextNode("Failure")); | ||
234 | |||
235 | rootElement.AppendChild(result); | ||
236 | |||
237 | return Util.DocToBytes(doc); | ||
238 | } | ||
239 | } | ||
240 | } | ||
diff --git a/OpenSim/Services/Connectors/MuteList/MuteListServicesConnector.cs b/OpenSim/Services/Connectors/MuteList/MuteListServicesConnector.cs new file mode 100644 index 0000000..e574c1d --- /dev/null +++ b/OpenSim/Services/Connectors/MuteList/MuteListServicesConnector.cs | |||
@@ -0,0 +1,183 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using log4net; | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.IO; | ||
32 | using System.Reflection; | ||
33 | using Nini.Config; | ||
34 | using OpenSim.Framework; | ||
35 | |||
36 | using OpenSim.Framework.ServiceAuth; | ||
37 | using OpenSim.Services.Interfaces; | ||
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
39 | using OpenSim.Server.Base; | ||
40 | using OpenMetaverse; | ||
41 | |||
42 | namespace OpenSim.Services.Connectors | ||
43 | { | ||
44 | public class MuteListServicesConnector : BaseServiceConnector, IMuteListService | ||
45 | { | ||
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
48 | private string m_ServerURI = String.Empty; | ||
49 | |||
50 | public MuteListServicesConnector() | ||
51 | { | ||
52 | } | ||
53 | |||
54 | public MuteListServicesConnector(string serverURI) | ||
55 | { | ||
56 | m_ServerURI = serverURI.TrimEnd('/') + "/mutelist"; | ||
57 | } | ||
58 | |||
59 | public MuteListServicesConnector(IConfigSource source) | ||
60 | { | ||
61 | Initialise(source); | ||
62 | } | ||
63 | |||
64 | public virtual void Initialise(IConfigSource source) | ||
65 | { | ||
66 | IConfig gridConfig = source.Configs["MuteListService"]; | ||
67 | if (gridConfig == null) | ||
68 | { | ||
69 | m_log.Error("[MUTELIST CONNECTOR]: MuteListService missing from configuration"); | ||
70 | throw new Exception("MuteList connector init error"); | ||
71 | } | ||
72 | |||
73 | string serviceURI = gridConfig.GetString("MuteListServerURI", | ||
74 | String.Empty); | ||
75 | |||
76 | if (serviceURI == String.Empty) | ||
77 | { | ||
78 | m_log.Error("[GRID USER CONNECTOR]: No Server URI named in section GridUserService"); | ||
79 | throw new Exception("GridUser connector init error"); | ||
80 | } | ||
81 | m_ServerURI = serviceURI + "/mutelist";; | ||
82 | base.Initialise(source, "MuteListService"); | ||
83 | } | ||
84 | |||
85 | #region IMuteListService | ||
86 | public Byte[] MuteListRequest(UUID agentID, uint crc) | ||
87 | { | ||
88 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
89 | sendData["METHOD"] = "get"; | ||
90 | sendData["agentid"] = agentID.ToString(); | ||
91 | sendData["mutecrc"] = crc.ToString(); | ||
92 | |||
93 | try | ||
94 | { | ||
95 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, | ||
96 | ServerUtils.BuildQueryString(sendData), m_Auth); | ||
97 | if (reply != string.Empty) | ||
98 | { | ||
99 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
100 | |||
101 | if (replyData.ContainsKey("result")) | ||
102 | { | ||
103 | string datastr = replyData["result"].ToString(); | ||
104 | if(String.IsNullOrWhiteSpace(datastr)) | ||
105 | return null; | ||
106 | return Convert.FromBase64String(datastr); | ||
107 | } | ||
108 | else | ||
109 | m_log.DebugFormat("[MUTELIST CONNECTOR]: get reply data does not contain result field"); | ||
110 | } | ||
111 | else | ||
112 | m_log.DebugFormat("[MUTELIST CONNECTOR]: get received empty reply"); | ||
113 | } | ||
114 | catch (Exception e) | ||
115 | { | ||
116 | m_log.DebugFormat("[MUTELIST CONNECTOR]: Exception when contacting server at {0}: {1}", m_ServerURI, e.Message); | ||
117 | } | ||
118 | |||
119 | return null; | ||
120 | } | ||
121 | |||
122 | public bool UpdateMute(MuteData mute) | ||
123 | { | ||
124 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
125 | sendData["METHOD"] = "update"; | ||
126 | sendData["agentid"] = mute.AgentID.ToString(); | ||
127 | sendData["muteid"] = mute.MuteID.ToString(); | ||
128 | if(mute.MuteType != 0) | ||
129 | sendData["mutetype"] = mute.MuteType.ToString(); | ||
130 | if(mute.MuteFlags != 0) | ||
131 | sendData["muteflags"] = mute.MuteFlags.ToString(); | ||
132 | sendData["mutestamp"] = mute.Stamp.ToString(); | ||
133 | if(!String.IsNullOrEmpty(mute.MuteName)) | ||
134 | sendData["mutename"] = mute.MuteName; | ||
135 | |||
136 | return doSimplePost(ServerUtils.BuildQueryString(sendData), "update"); | ||
137 | } | ||
138 | |||
139 | public bool RemoveMute(UUID agentID, UUID muteID, string muteName) | ||
140 | { | ||
141 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
142 | sendData["METHOD"] = "delete"; | ||
143 | sendData["agentid"] = agentID.ToString(); | ||
144 | sendData["muteid"] = muteID.ToString(); | ||
145 | if(!String.IsNullOrEmpty(muteName)) | ||
146 | sendData["mutename"] = muteName; | ||
147 | |||
148 | return doSimplePost(ServerUtils.BuildQueryString(sendData), "remove"); | ||
149 | } | ||
150 | |||
151 | #endregion IMuteListService | ||
152 | |||
153 | private bool doSimplePost(string reqString, string meth) | ||
154 | { | ||
155 | try | ||
156 | { | ||
157 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", m_ServerURI, reqString, m_Auth); | ||
158 | if (reply != string.Empty) | ||
159 | { | ||
160 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
161 | |||
162 | if (replyData.ContainsKey("result")) | ||
163 | { | ||
164 | if (replyData["result"].ToString().ToLower() == "success") | ||
165 | return true; | ||
166 | else | ||
167 | return false; | ||
168 | } | ||
169 | else | ||
170 | m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} reply data does not contain result field", meth); | ||
171 | } | ||
172 | else | ||
173 | m_log.DebugFormat("[MUTELIST CONNECTOR]: {0} received empty reply", meth); | ||
174 | } | ||
175 | catch (Exception e) | ||
176 | { | ||
177 | m_log.DebugFormat("[MUTELIST CONNECTOR]: Exception when contacting server at {0}: {1}", m_ServerURI, e.Message); | ||
178 | } | ||
179 | |||
180 | return false; | ||
181 | } | ||
182 | } | ||
183 | } | ||
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 146d538..82bed30 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -110,6 +110,8 @@ | |||
110 | ;; Uncomment if you want to have centralized estate data | 110 | ;; Uncomment if you want to have centralized estate data |
111 | ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" | 111 | ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" |
112 | 112 | ||
113 | MuteListConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MuteListServiceConnector" | ||
114 | |||
113 | ;; Additions for Hypergrid | 115 | ;; Additions for Hypergrid |
114 | 116 | ||
115 | GatekeeperServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector" | 117 | GatekeeperServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector" |
@@ -815,3 +817,6 @@ | |||
815 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" | 817 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" |
816 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. | 818 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. |
817 | BaseDirectory = "./bakes" | 819 | BaseDirectory = "./bakes" |
820 | |||
821 | [MuteListService] | ||
822 | LocalServiceModule = "OpenSim.Services.MuteListService.dll:MuteListService" | ||
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index fac5b60..5690c1d 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example | |||
@@ -101,6 +101,8 @@ | |||
101 | ;; Uncomment if you want to have centralized estate data | 101 | ;; Uncomment if you want to have centralized estate data |
102 | ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" | 102 | ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" |
103 | 103 | ||
104 | MuteListConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MuteListServiceConnector" | ||
105 | |||
104 | ; * This is common for all services, it's the network setup for the entire | 106 | ; * This is common for all services, it's the network setup for the entire |
105 | ; * server instance, if none is specified above | 107 | ; * server instance, if none is specified above |
106 | ; * | 108 | ; * |
@@ -569,3 +571,6 @@ | |||
569 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" | 571 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" |
570 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. | 572 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. |
571 | BaseDirectory = "./bakes" | 573 | BaseDirectory = "./bakes" |
574 | |||
575 | [MuteListService] | ||
576 | LocalServiceModule = "OpenSim.Services.MuteListService.dll:MuteListService" | ||
diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini index 988e681..7330f6f 100644 --- a/bin/config-include/Grid.ini +++ b/bin/config-include/Grid.ini | |||
@@ -25,7 +25,8 @@ | |||
25 | LandServices = "RemoteLandServicesConnector" | 25 | LandServices = "RemoteLandServicesConnector" |
26 | MapImageService = "MapImageServiceModule" | 26 | MapImageService = "MapImageServiceModule" |
27 | SearchModule = "BasicSearchModule" | 27 | SearchModule = "BasicSearchModule" |
28 | 28 | MuteListService = "RemoteMuteListServicesConnector" | |
29 | |||
29 | LandServiceInConnector = true | 30 | LandServiceInConnector = true |
30 | NeighbourServiceInConnector = true | 31 | NeighbourServiceInConnector = true |
31 | SimulationServiceInConnector = true | 32 | SimulationServiceInConnector = true |
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 10a5b47..aee3d5f 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example | |||
@@ -244,3 +244,6 @@ | |||
244 | 244 | ||
245 | ;; Capability assigned by the grid administrator for the simulator | 245 | ;; Capability assigned by the grid administrator for the simulator |
246 | ;; SimulatorCapability = "00000000-0000-0000-0000-000000000000" | 246 | ;; SimulatorCapability = "00000000-0000-0000-0000-000000000000" |
247 | |||
248 | [MuteListService] | ||
249 | MuteListServerURI = "${Const|BaseURL}:${Const|PrivatePort}" | ||
diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index 709c462..78bcd73 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini | |||
@@ -30,7 +30,8 @@ | |||
30 | MapImageService = "MapImageServiceModule" | 30 | MapImageService = "MapImageServiceModule" |
31 | UserManagementModule = "HGUserManagementModule" | 31 | UserManagementModule = "HGUserManagementModule" |
32 | SearchModule = "BasicSearchModule" | 32 | SearchModule = "BasicSearchModule" |
33 | 33 | MuteListService = "RemoteMuteListServicesConnector" | |
34 | |||
34 | LandServiceInConnector = true | 35 | LandServiceInConnector = true |
35 | NeighbourServiceInConnector = true | 36 | NeighbourServiceInConnector = true |
36 | SimulationServiceInConnector = true | 37 | SimulationServiceInConnector = true |