diff options
9 files changed, 197 insertions, 213 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index e5a6d49..43dea0b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt | |||
@@ -93,6 +93,7 @@ what it is today. | |||
93 | * Garmin Kawaguichi | 93 | * Garmin Kawaguichi |
94 | * Gryc Ueusp | 94 | * Gryc Ueusp |
95 | * Hiro Lecker | 95 | * Hiro Lecker |
96 | * Iain Oliver | ||
96 | * Imaze Rhiano | 97 | * Imaze Rhiano |
97 | * Intimidated | 98 | * Intimidated |
98 | * Jeremy Bongio (IBM) | 99 | * Jeremy Bongio (IBM) |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 3198891..77fce9e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -720,8 +720,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
720 | if (DebugLevel == 5) | 720 | if (DebugLevel == 5) |
721 | { | 721 | { |
722 | const int sampleLength = 80; | 722 | const int sampleLength = 80; |
723 | char[] sampleChars = new char[sampleLength]; | 723 | char[] sampleChars = new char[sampleLength + 3]; |
724 | reader.Read(sampleChars, 0, sampleLength); | 724 | reader.Read(sampleChars, 0, sampleLength); |
725 | sampleChars[80] = '.'; | ||
726 | sampleChars[81] = '.'; | ||
727 | sampleChars[82] = '.'; | ||
725 | output = new string(sampleChars); | 728 | output = new string(sampleChars); |
726 | } | 729 | } |
727 | else | 730 | else |
@@ -729,7 +732,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
729 | output = reader.ReadToEnd(); | 732 | output = reader.ReadToEnd(); |
730 | } | 733 | } |
731 | 734 | ||
732 | m_log.DebugFormat("[BASE HTTP SERVER]: {0}...", output.Replace("\n", @"\n")); | 735 | m_log.DebugFormat("[BASE HTTP SERVER]: {0}", output.Replace("\n", @"\n")); |
733 | } | 736 | } |
734 | } | 737 | } |
735 | 738 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs new file mode 100644 index 0000000..fdbe10a --- /dev/null +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/BasePresenceServiceConnector.cs | |||
@@ -0,0 +1,137 @@ | |||
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 System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using OpenMetaverse; | ||
35 | using OpenSim.Region.Framework.Interfaces; | ||
36 | using OpenSim.Region.Framework.Scenes; | ||
37 | using OpenSim.Server.Base; | ||
38 | using OpenSim.Services.Interfaces; | ||
39 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; | ||
40 | |||
41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | ||
42 | { | ||
43 | public class BasePresenceServiceConnector : IPresenceService | ||
44 | { | ||
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
47 | protected bool m_Enabled; | ||
48 | |||
49 | protected PresenceDetector m_PresenceDetector; | ||
50 | |||
51 | /// <summary> | ||
52 | /// Underlying presence service. Do not use directly. | ||
53 | /// </summary> | ||
54 | public IPresenceService m_PresenceService; | ||
55 | |||
56 | public Type ReplaceableInterface | ||
57 | { | ||
58 | get { return null; } | ||
59 | } | ||
60 | |||
61 | public void AddRegion(Scene scene) | ||
62 | { | ||
63 | if (!m_Enabled) | ||
64 | return; | ||
65 | |||
66 | // m_log.DebugFormat( | ||
67 | // "[LOCAL PRESENCE CONNECTOR]: Registering IPresenceService to scene {0}", scene.RegionInfo.RegionName); | ||
68 | |||
69 | scene.RegisterModuleInterface<IPresenceService>(this); | ||
70 | m_PresenceDetector.AddRegion(scene); | ||
71 | |||
72 | m_log.InfoFormat("[BASE PRESENCE SERVICE CONNECTOR]: Enabled for region {0}", scene.Name); | ||
73 | } | ||
74 | |||
75 | public void RemoveRegion(Scene scene) | ||
76 | { | ||
77 | if (!m_Enabled) | ||
78 | return; | ||
79 | |||
80 | m_PresenceDetector.RemoveRegion(scene); | ||
81 | } | ||
82 | |||
83 | public void RegionLoaded(Scene scene) | ||
84 | { | ||
85 | if (!m_Enabled) | ||
86 | return; | ||
87 | |||
88 | } | ||
89 | |||
90 | public void PostInitialise() | ||
91 | { | ||
92 | } | ||
93 | |||
94 | public void Close() | ||
95 | { | ||
96 | } | ||
97 | |||
98 | #region IPresenceService | ||
99 | |||
100 | public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID) | ||
101 | { | ||
102 | m_log.Warn("[BASE PRESENCE SERVICE CONNECTOR]: LoginAgent connector not implemented at the simulators"); | ||
103 | return false; | ||
104 | } | ||
105 | |||
106 | public bool LogoutAgent(UUID sessionID) | ||
107 | { | ||
108 | return m_PresenceService.LogoutAgent(sessionID); | ||
109 | } | ||
110 | |||
111 | public bool LogoutRegionAgents(UUID regionID) | ||
112 | { | ||
113 | return m_PresenceService.LogoutRegionAgents(regionID); | ||
114 | } | ||
115 | |||
116 | public bool ReportAgent(UUID sessionID, UUID regionID) | ||
117 | { | ||
118 | return m_PresenceService.ReportAgent(sessionID, regionID); | ||
119 | } | ||
120 | |||
121 | public PresenceInfo GetAgent(UUID sessionID) | ||
122 | { | ||
123 | return m_PresenceService.GetAgent(sessionID); | ||
124 | } | ||
125 | |||
126 | public PresenceInfo[] GetAgents(string[] userIDs) | ||
127 | { | ||
128 | // Don't bother potentially making a useless network call if we not going to ask for any users anyway. | ||
129 | if (userIDs.Length == 0) | ||
130 | return new PresenceInfo[0]; | ||
131 | |||
132 | return m_PresenceService.GetAgents(userIDs); | ||
133 | } | ||
134 | |||
135 | #endregion | ||
136 | } | ||
137 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs index d8bed1b..db5c520 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/LocalPresenceServiceConnector.cs | |||
@@ -24,53 +24,29 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | |||
27 | using System; | 28 | using System; |
28 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | 31 | using log4net; | |
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using OpenMetaverse; | ||
31 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
32 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
33 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
34 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
35 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; | 39 | using PresenceInfo = OpenSim.Services.Interfaces.PresenceInfo; |
36 | 40 | ||
37 | using OpenMetaverse; | ||
38 | using log4net; | ||
39 | using Mono.Addins; | ||
40 | using Nini.Config; | ||
41 | |||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | 41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence |
43 | { | 42 | { |
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalPresenceServicesConnector")] | 43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalPresenceServicesConnector")] |
45 | public class LocalPresenceServicesConnector : ISharedRegionModule, IPresenceService | 44 | public class LocalPresenceServicesConnector : BasePresenceServiceConnector, ISharedRegionModule, IPresenceService |
46 | { | 45 | { |
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 47 | ||
49 | private bool m_Enabled = false; | ||
50 | |||
51 | private PresenceDetector m_PresenceDetector; | ||
52 | |||
53 | /// <summary> | ||
54 | /// Underlying presence service. Do not use directly. | ||
55 | /// </summary> | ||
56 | public IPresenceService m_PresenceService; | ||
57 | |||
58 | public LocalPresenceServicesConnector() | ||
59 | { | ||
60 | } | ||
61 | |||
62 | public LocalPresenceServicesConnector(IConfigSource source) | ||
63 | { | ||
64 | Initialise(source); | ||
65 | } | ||
66 | |||
67 | #region ISharedRegionModule | 48 | #region ISharedRegionModule |
68 | 49 | ||
69 | public Type ReplaceableInterface | ||
70 | { | ||
71 | get { return null; } | ||
72 | } | ||
73 | |||
74 | public string Name | 50 | public string Name |
75 | { | 51 | { |
76 | get { return "LocalPresenceServicesConnector"; } | 52 | get { return "LocalPresenceServicesConnector"; } |
@@ -121,81 +97,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
121 | } | 97 | } |
122 | } | 98 | } |
123 | 99 | ||
124 | public void PostInitialise() | ||
125 | { | ||
126 | } | ||
127 | |||
128 | public void Close() | ||
129 | { | ||
130 | } | ||
131 | |||
132 | public void AddRegion(Scene scene) | ||
133 | { | ||
134 | if (!m_Enabled) | ||
135 | return; | ||
136 | |||
137 | // m_log.DebugFormat( | ||
138 | // "[LOCAL PRESENCE CONNECTOR]: Registering IPresenceService to scene {0}", scene.RegionInfo.RegionName); | ||
139 | |||
140 | scene.RegisterModuleInterface<IPresenceService>(this); | ||
141 | m_PresenceDetector.AddRegion(scene); | ||
142 | |||
143 | m_log.InfoFormat("[LOCAL PRESENCE CONNECTOR]: Enabled local presence for region {0}", scene.RegionInfo.RegionName); | ||
144 | |||
145 | } | ||
146 | |||
147 | public void RemoveRegion(Scene scene) | ||
148 | { | ||
149 | if (!m_Enabled) | ||
150 | return; | ||
151 | |||
152 | m_PresenceDetector.RemoveRegion(scene); | ||
153 | } | ||
154 | |||
155 | public void RegionLoaded(Scene scene) | ||
156 | { | ||
157 | if (!m_Enabled) | ||
158 | return; | ||
159 | |||
160 | } | ||
161 | |||
162 | #endregion | 100 | #endregion |
163 | |||
164 | #region IPresenceService | ||
165 | |||
166 | public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID) | ||
167 | { | ||
168 | m_log.Warn("[LOCAL PRESENCE CONNECTOR]: LoginAgent connector not implemented at the simulators"); | ||
169 | return false; | ||
170 | } | ||
171 | |||
172 | public bool LogoutAgent(UUID sessionID) | ||
173 | { | ||
174 | return m_PresenceService.LogoutAgent(sessionID); | ||
175 | } | ||
176 | |||
177 | |||
178 | public bool LogoutRegionAgents(UUID regionID) | ||
179 | { | ||
180 | return m_PresenceService.LogoutRegionAgents(regionID); | ||
181 | } | ||
182 | |||
183 | public bool ReportAgent(UUID sessionID, UUID regionID) | ||
184 | { | ||
185 | return m_PresenceService.ReportAgent(sessionID, regionID); | ||
186 | } | ||
187 | |||
188 | public PresenceInfo GetAgent(UUID sessionID) | ||
189 | { | ||
190 | return m_PresenceService.GetAgent(sessionID); | ||
191 | } | ||
192 | |||
193 | public PresenceInfo[] GetAgents(string[] userIDs) | ||
194 | { | ||
195 | return m_PresenceService.GetAgents(userIDs); | ||
196 | } | ||
197 | |||
198 | #endregion | ||
199 | |||
200 | } | 101 | } |
201 | } | 102 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs index be73932..6ca5c28 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/RemotePresenceServiceConnector.cs | |||
@@ -43,22 +43,12 @@ using Nini.Config; | |||
43 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | 43 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence |
44 | { | 44 | { |
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemotePresenceServicesConnector")] | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RemotePresenceServicesConnector")] |
46 | public class RemotePresenceServicesConnector : ISharedRegionModule, IPresenceService | 46 | public class RemotePresenceServicesConnector : BasePresenceServiceConnector, ISharedRegionModule |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | #region ISharedRegionModule | 50 | #region ISharedRegionModule |
51 | 51 | ||
52 | private bool m_Enabled = false; | ||
53 | |||
54 | private PresenceDetector m_PresenceDetector; | ||
55 | private IPresenceService m_RemoteConnector; | ||
56 | |||
57 | public Type ReplaceableInterface | ||
58 | { | ||
59 | get { return null; } | ||
60 | } | ||
61 | |||
62 | public string Name | 52 | public string Name |
63 | { | 53 | { |
64 | get { return "RemotePresenceServicesConnector"; } | 54 | get { return "RemotePresenceServicesConnector"; } |
@@ -72,7 +62,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
72 | string name = moduleConfig.GetString("PresenceServices", ""); | 62 | string name = moduleConfig.GetString("PresenceServices", ""); |
73 | if (name == Name) | 63 | if (name == Name) |
74 | { | 64 | { |
75 | m_RemoteConnector = new PresenceServicesConnector(source); | 65 | m_PresenceService = new PresenceServicesConnector(source); |
76 | 66 | ||
77 | m_Enabled = true; | 67 | m_Enabled = true; |
78 | 68 | ||
@@ -81,81 +71,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence | |||
81 | m_log.Info("[REMOTE PRESENCE CONNECTOR]: Remote presence enabled"); | 71 | m_log.Info("[REMOTE PRESENCE CONNECTOR]: Remote presence enabled"); |
82 | } | 72 | } |
83 | } | 73 | } |
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<IPresenceService>(this); | ||
101 | m_PresenceDetector.AddRegion(scene); | ||
102 | |||
103 | m_log.InfoFormat("[REMOTE PRESENCE CONNECTOR]: Enabled remote presence for region {0}", scene.RegionInfo.RegionName); | ||
104 | |||
105 | } | ||
106 | |||
107 | public void RemoveRegion(Scene scene) | ||
108 | { | ||
109 | if (!m_Enabled) | ||
110 | return; | ||
111 | |||
112 | m_PresenceDetector.RemoveRegion(scene); | ||
113 | } | ||
114 | |||
115 | public void RegionLoaded(Scene scene) | ||
116 | { | ||
117 | if (!m_Enabled) | ||
118 | return; | ||
119 | |||
120 | } | ||
121 | |||
122 | #endregion | ||
123 | |||
124 | #region IPresenceService | ||
125 | |||
126 | public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID) | ||
127 | { | ||
128 | m_log.Warn("[REMOTE PRESENCE CONNECTOR]: LoginAgent connector not implemented at the simulators"); | ||
129 | return false; | ||
130 | } | ||
131 | |||
132 | public bool LogoutAgent(UUID sessionID) | ||
133 | { | ||
134 | return m_RemoteConnector.LogoutAgent(sessionID); | ||
135 | } | ||
136 | |||
137 | |||
138 | public bool LogoutRegionAgents(UUID regionID) | ||
139 | { | ||
140 | return m_RemoteConnector.LogoutRegionAgents(regionID); | ||
141 | } | ||
142 | |||
143 | public bool ReportAgent(UUID sessionID, UUID regionID) | ||
144 | { | ||
145 | return m_RemoteConnector.ReportAgent(sessionID, regionID); | ||
146 | } | ||
147 | |||
148 | public PresenceInfo GetAgent(UUID sessionID) | ||
149 | { | ||
150 | return m_RemoteConnector.GetAgent(sessionID); | ||
151 | } | ||
152 | |||
153 | public PresenceInfo[] GetAgents(string[] userIDs) | ||
154 | { | ||
155 | return m_RemoteConnector.GetAgents(userIDs); | ||
156 | } | 74 | } |
157 | 75 | ||
158 | #endregion | 76 | #endregion |
159 | |||
160 | } | 77 | } |
161 | } | 78 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs index 4556df3..32e47f9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Presence/Tests/PresenceConnectorsTests.cs | |||
@@ -56,7 +56,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.Tests | |||
56 | config.Configs["PresenceService"].Set("LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService"); | 56 | config.Configs["PresenceService"].Set("LocalServiceModule", "OpenSim.Services.PresenceService.dll:PresenceService"); |
57 | config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); | 57 | config.Configs["PresenceService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
58 | 58 | ||
59 | m_LocalConnector = new LocalPresenceServicesConnector(config); | 59 | m_LocalConnector = new LocalPresenceServicesConnector(); |
60 | m_LocalConnector.Initialise(config); | ||
60 | 61 | ||
61 | // Let's stick in a test presence | 62 | // Let's stick in a test presence |
62 | m_LocalConnector.m_PresenceService.LoginAgent(UUID.Zero.ToString(), UUID.Zero, UUID.Zero); | 63 | m_LocalConnector.m_PresenceService.LoginAgent(UUID.Zero.ToString(), UUID.Zero, UUID.Zero); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 25a53b4..7f07d73 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1844,8 +1844,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1844 | // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", | 1844 | // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", |
1845 | // Name, pos, m_scene.RegionInfo.RegionName); | 1845 | // Name, pos, m_scene.RegionInfo.RegionName); |
1846 | 1846 | ||
1847 | if (pos.X < 0 || pos.X >= Constants.RegionSize | 1847 | // Allow move to another sub-region within a megaregion |
1848 | || pos.Y < 0 || pos.Y >= Constants.RegionSize | 1848 | Vector2 regionSize; |
1849 | IRegionCombinerModule regionCombinerModule = m_scene.RequestModuleInterface<IRegionCombinerModule>(); | ||
1850 | if (regionCombinerModule != null) | ||
1851 | regionSize = regionCombinerModule.GetSizeOfMegaregion(m_scene.RegionInfo.RegionID); | ||
1852 | else | ||
1853 | regionSize = new Vector2(Constants.RegionSize); | ||
1854 | |||
1855 | if (pos.X < 0 || pos.X >= regionSize.X | ||
1856 | || pos.Y < 0 || pos.Y >= regionSize.Y | ||
1849 | || pos.Z < 0) | 1857 | || pos.Z < 0) |
1850 | return; | 1858 | return; |
1851 | 1859 | ||
@@ -1859,7 +1867,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1859 | // pos.Z = AbsolutePosition.Z; | 1867 | // pos.Z = AbsolutePosition.Z; |
1860 | // } | 1868 | // } |
1861 | 1869 | ||
1862 | float terrainHeight = (float)m_scene.Heightmap[(int)pos.X, (int)pos.Y]; | 1870 | // Get terrain height for sub-region in a megaregion if necessary |
1871 | int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); | ||
1872 | int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); | ||
1873 | UUID target_regionID = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y).RegionID; | ||
1874 | Scene targetScene = m_scene; | ||
1875 | |||
1876 | if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) | ||
1877 | targetScene = m_scene; | ||
1878 | |||
1879 | float terrainHeight = (float)targetScene.Heightmap[(int)(pos.X % Constants.RegionSize), (int)(pos.Y % Constants.RegionSize)]; | ||
1863 | pos.Z = Math.Max(terrainHeight, pos.Z); | 1880 | pos.Z = Math.Max(terrainHeight, pos.Z); |
1864 | 1881 | ||
1865 | // Fudge factor. It appears that if one clicks "go here" on a piece of ground, the go here request is | 1882 | // Fudge factor. It appears that if one clicks "go here" on a piece of ground, the go here request is |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index b21a214..6757081 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -439,9 +439,30 @@ | |||
439 | ;; What is reported as the "User-Agent" when using llHTTPRequest | 439 | ;; What is reported as the "User-Agent" when using llHTTPRequest |
440 | ;; Defaults to not sent if not set here. See the notes section in the wiki | 440 | ;; Defaults to not sent if not set here. See the notes section in the wiki |
441 | ;; at http://wiki.secondlife.com/wiki/LlHTTPRequest for comments on adding | 441 | ;; at http://wiki.secondlife.com/wiki/LlHTTPRequest for comments on adding |
442 | ;; " (Mozilla Compatible)" to the text where there are problems with a web server | 442 | ;; " (Mozilla Compatible)" to the text where there are problems with a |
443 | ;; web server | ||
443 | ; user_agent = "OpenSim LSL (Mozilla Compatible)" | 444 | ; user_agent = "OpenSim LSL (Mozilla Compatible)" |
444 | 445 | ||
446 | [XMLRPC] | ||
447 | ;# {XmlRpcRouterModule} {} {Module used to route incoming llRemoteData calls} {XmlRpcRouterModule XmlRpcGridRouterModule} XmlRpcRouterModule | ||
448 | ;; If enabled and set to XmlRpcRouterModule, this will post an event, | ||
449 | ;; "xmlrpc_uri(string)" to the script concurrently with the first | ||
450 | ;; remote_data event. This will contain the fully qualified URI an | ||
451 | ;; external site needs to use to send XMLRPC requests to that script | ||
452 | ;; | ||
453 | ;; If enabled and set to XmlRpcGridRouterModule, newly created channels | ||
454 | ;; will be registered with an external service via a configured uri | ||
455 | ;XmlRpcRouterModule = "XmlRpcRouterModule" | ||
456 | |||
457 | ;# {XmlRpcPort} {} {Port for incoming llRemoteData xmlrpc calls} {} 20800 | ||
458 | ;XmlRpcPort = 20800 | ||
459 | |||
460 | ;# {XmlRpcHubURI} {XmlRpcRouterModule} {URI for external service used to register xmlrpc channels created in the simulator. This depends on XmlRpcRouterModule being set to XmlRpcGridRouterModule} http://example.com | ||
461 | ;; If XmlRpcRouterModule is set to XmlRpcGridRouterModule, the simulator | ||
462 | ;; will use this address to register xmlrpc channels on the external | ||
463 | ;; service | ||
464 | ; XmlRpcHubURI = http://example.com | ||
465 | |||
445 | 466 | ||
446 | [ClientStack.LindenUDP] | 467 | [ClientStack.LindenUDP] |
447 | ;; See OpensSimDefaults.ini for the throttle options. You can copy the | 468 | ;; See OpensSimDefaults.ini for the throttle options. You can copy the |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 16cde7e..01ba5b9 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -425,20 +425,6 @@ | |||
425 | ; many simultaneous requests, default is 30 and is currently applied only to assets | 425 | ; many simultaneous requests, default is 30 and is currently applied only to assets |
426 | ;MaxRequestConcurrency = 30 | 426 | ;MaxRequestConcurrency = 30 |
427 | 427 | ||
428 | [XMLRPC] | ||
429 | ; ## | ||
430 | ; ## Scripting XMLRPC mapper | ||
431 | ; ## | ||
432 | |||
433 | ; If enabled, this will post an event, "xmlrpc_uri(string)" to the | ||
434 | ; script concurrently with the first remote_data event. | ||
435 | ; This will contain the fully qualified URI an external site needs | ||
436 | ; to use to send XMLRPC requests to that script | ||
437 | |||
438 | ;XmlRpcRouterModule = "XmlRpcRouterModule" | ||
439 | ;XmlRpcPort = 20800 | ||
440 | |||
441 | |||
442 | [ClientStack.LindenUDP] | 428 | [ClientStack.LindenUDP] |
443 | ; Set this to true to process incoming packets asynchronously. Networking is | 429 | ; Set this to true to process incoming packets asynchronously. Networking is |
444 | ; already separated from packet handling with a queue, so this will only | 430 | ; already separated from packet handling with a queue, so this will only |