aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut
diff options
context:
space:
mode:
authorUbitUmarov2015-11-01 03:01:59 +0000
committerUbitUmarov2015-11-01 03:01:59 +0000
commit72684592ba196095311b308407cbe5751c6dd8dd (patch)
treec51a1fb67c6d425b1cb904e788bac8a720d951c8 /OpenSim/Region/CoreModules/ServiceConnectorsOut
parent fix cut points of UTF-8 strings (diff)
parentMinor: Add an initializer to show what the default value would be. (diff)
downloadopensim-SC_OLD-72684592ba196095311b308407cbe5751c6dd8dd.zip
opensim-SC_OLD-72684592ba196095311b308407cbe5751c6dd8dd.tar.gz
opensim-SC_OLD-72684592ba196095311b308407cbe5751c6dd8dd.tar.bz2
opensim-SC_OLD-72684592ba196095311b308407cbe5751c6dd8dd.tar.xz
Merge branch 'master' into avinationmerge
Conflicts: OpenSim/Framework/AvatarAppearance.cs OpenSim/Framework/Servers/ServerBase.cs OpenSim/Framework/VersionInfo.cs OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs OpenSim/Region/PhysicsModules/Ode/OdeScene.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs OpenSim/Services/HypergridService/GatekeeperService.cs OpenSim/Services/Interfaces/IAvatarService.cs OpenSim/Services/LLLoginService/LLLoginService.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs23
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs8
2 files changed, 8 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index de0ae4c..6cb15f6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -46,11 +46,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary> 48 /// <summary>
49 /// Version of this service.
50 /// </summary>
51 public string ServiceVersion { get; set; }
52
53 /// <summary>
54 /// Map region ID to scene. 49 /// Map region ID to scene.
55 /// </summary> 50 /// </summary>
56 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 51 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
@@ -81,8 +76,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
81 76
82 public void InitialiseService(IConfigSource configSource) 77 public void InitialiseService(IConfigSource configSource)
83 { 78 {
84 ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
85 m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
86 } 79 }
87 80
88 public void PostInitialise() 81 public void PostInitialise()
@@ -251,11 +244,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
251 return true; 244 return true;
252 } 245 }
253 246
254 247 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason)
255 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List<UUID> features, out string version, out string reason)
256 { 248 {
257 reason = "Communications failure"; 249 reason = "Communications failure";
258 version = ServiceVersion;
259 if (destination == null) 250 if (destination == null)
260 return false; 251 return false;
261 252
@@ -264,19 +255,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
264// m_log.DebugFormat( 255// m_log.DebugFormat(
265// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 256// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
266// s.RegionInfo.RegionName, destination.RegionHandle); 257// s.RegionInfo.RegionName, destination.RegionHandle);
267 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; 258 uint sizeX = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
268 259 uint sizeY = m_scenes[destination.RegionID].RegionInfo.RegionSizeY;
269 float theirVersionNumber = 0f;
270 string[] versionComponents = theirversion.Split(new char[] { '/' });
271 if (versionComponents.Length >= 2)
272 float.TryParse(versionComponents[1], out theirVersionNumber);
273 260
274 // Var regions here, and the requesting simulator is in an older version. 261 // Var regions here, and the requesting simulator is in an older version.
275 // We will forbide this, because it crashes the viewers 262 // We will forbide this, because it crashes the viewers
276 if (theirVersionNumber < 0.3f && size > 256) 263 if (ctx.OutboundVersion < 0.3f && (sizeX != 256 || sizeY != 256))
277 { 264 {
278 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
279 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); 266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
280 return false; 267 return false;
281 268
282 } 269 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index c1daae9..cf19edd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -205,22 +205,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
205 return m_remoteConnector.UpdateAgent(destination, cAgentData); 205 return m_remoteConnector.UpdateAgent(destination, cAgentData);
206 } 206 }
207 207
208 208 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason)
209 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List<UUID> features, out string version, out string reason)
210 { 209 {
211 reason = "Communications failure"; 210 reason = "Communications failure";
212 version = "Unknown";
213 211
214 if (destination == null) 212 if (destination == null)
215 return false; 213 return false;
216 214
217 // Try local first 215 // Try local first
218 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason)) 216 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason))
219 return true; 217 return true;
220 218
221 // else do the remote thing 219 // else do the remote thing
222 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 220 if (!m_localBackend.IsLocalRegion(destination.RegionID))
223 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason); 221 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason);
224 222
225 return false; 223 return false;
226 } 224 }