aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2015-08-20 00:18:45 +0200
committerMelanie Thielker2015-08-20 00:18:45 +0200
commit028506cf3cecb3666b0c185d9c25e21bab968c93 (patch)
tree22f544d4966ba2c71a7c86122d7f8efd525a2790 /OpenSim/Region
parentMerge branch 'master' of opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-028506cf3cecb3666b0c185d9c25e21bab968c93.zip
opensim-SC_OLD-028506cf3cecb3666b0c185d9c25e21bab968c93.tar.gz
opensim-SC_OLD-028506cf3cecb3666b0c185d9c25e21bab968c93.tar.bz2
opensim-SC_OLD-028506cf3cecb3666b0c185d9c25e21bab968c93.tar.xz
Partial plumbing for the agent stateful module features negotiation
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs6
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs7
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs7
5 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8a1bf20..4be19f0 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -762,7 +762,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
762 string version; 762 string version;
763 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion); 763 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
764 if (!Scene.SimulationService.QueryAccess( 764 if (!Scene.SimulationService.QueryAccess(
765 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, out version, out reason)) 765 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, myversion, sp.Scene.GetFormatsOffered(), out version, out reason))
766 { 766 {
767 sp.ControllingClient.SendTeleportFailed(reason); 767 sp.ControllingClient.SendTeleportFailed(reason);
768 768
@@ -1517,7 +1517,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1517 // Check to see if we have access to the target region. 1517 // Check to see if we have access to the target region.
1518 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion); 1518 string myversion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
1519 if (neighbourRegion != null 1519 if (neighbourRegion != null
1520 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, out version, out failureReason)) 1520 && !scene.SimulationService.QueryAccess(neighbourRegion, agentID, homeURI, false, newpos, myversion, scene.GetFormatsOffered(), out version, out failureReason))
1521 { 1521 {
1522 // remember banned 1522 // remember banned
1523 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); 1523 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 8fd5df8..adf3a91 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -269,7 +269,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
269 return true; 269 return true;
270 } 270 }
271 271
272 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, out string version, out string reason) 272 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List<UUID> features, out string version, out string reason)
273 { 273 {
274 reason = "Communications failure"; 274 reason = "Communications failure";
275 version = ServiceVersion; 275 version = ServiceVersion;
@@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
298 298
299 } 299 }
300 300
301 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, out reason); 301 return m_scenes[destination.RegionID].QueryAccess(agentID, agentHomeURI, viaTeleport, position, features, out reason);
302 } 302 }
303 303
304 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); 304 //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess");
@@ -394,4 +394,4 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
394 394
395 #endregion 395 #endregion
396 } 396 }
397} \ No newline at end of file 397}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index 3a32d77..dca3dd7 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic;
30using System.IO; 31using System.IO;
31using System.Net; 32using System.Net;
32using System.Reflection; 33using System.Reflection;
@@ -205,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
205 return m_remoteConnector.UpdateAgent(destination, cAgentData); 206 return m_remoteConnector.UpdateAgent(destination, cAgentData);
206 } 207 }
207 208
208 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, out string version, 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)
209 { 210 {
210 reason = "Communications failure"; 211 reason = "Communications failure";
211 version = "Unknown"; 212 version = "Unknown";
@@ -214,12 +215,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
214 return false; 215 return false;
215 216
216 // Try local first 217 // Try local first
217 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason)) 218 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason))
218 return true; 219 return true;
219 220
220 // else do the remote thing 221 // else do the remote thing
221 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 222 if (!m_localBackend.IsLocalRegion(destination.RegionID))
222 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, out version, out reason); 223 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason);
223 224
224 return false; 225 return false;
225 } 226 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 24c95d1..fe99ae5 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5810,7 +5810,7 @@ namespace OpenSim.Region.Framework.Scenes
5810 /// <param name='position'></param> 5810 /// <param name='position'></param>
5811 /// <param name='reason'></param> 5811 /// <param name='reason'></param>
5812 /// <returns></returns> 5812 /// <returns></returns>
5813 public bool QueryAccess(UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, out string reason) 5813 public bool QueryAccess(UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, out string reason)
5814 { 5814 {
5815 reason = string.Empty; 5815 reason = string.Empty;
5816 5816
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index a928db4..7ff3d40 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -374,6 +374,13 @@ namespace OpenSim.Region.Framework.Scenes
374 return m_moduleCommanders; 374 return m_moduleCommanders;
375 } 375 }
376 376
377 public List<UUID> GetFormatsOffered()
378 {
379 List<UUID> ret = new List<UUID>(FormatsOffered);
380
381 return ret;
382 }
383
377 protected void CheckAndAddAgentDataFormats(object mod) 384 protected void CheckAndAddAgentDataFormats(object mod)
378 { 385 {
379 if (!(mod is IAgentStatefulModule)) 386 if (!(mod is IAgentStatefulModule))