aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorDiva Canto2015-10-18 16:06:31 -0700
committerDiva Canto2015-10-18 16:24:33 -0700
commit7ab633461ed65d1080b569532020379a068352b5 (patch)
treeec1efcb5e8d207e62b494f4d3ce404d6d61e1aaf /OpenSim/Region/CoreModules
parentThe protocol version checking on the grid server connector seemed to have a b... (diff)
downloadopensim-SC_OLD-7ab633461ed65d1080b569532020379a068352b5.zip
opensim-SC_OLD-7ab633461ed65d1080b569532020379a068352b5.tar.gz
opensim-SC_OLD-7ab633461ed65d1080b569532020379a068352b5.tar.bz2
opensim-SC_OLD-7ab633461ed65d1080b569532020379a068352b5.tar.xz
Fixed merge conflicts
Clean up of simulation version, the number that rules the compatibility of teleports: - It's not configurable anymore, it's fixed in code. Each number means an increase in features of the teleport procedure - Its definition moved to the global VersionInfo class As of now it's still 0.3. Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs47
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs22
2 files changed, 9 insertions, 60 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index a43b823..9be6d45 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -57,12 +57,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
57 public const int DefaultMaxTransferDistance = 4095; 57 public const int DefaultMaxTransferDistance = 4095;
58 public const bool WaitForAgentArrivedAtDestinationDefault = true; 58 public const bool WaitForAgentArrivedAtDestinationDefault = true;
59 59
60 private string OutgoingTransferVersionName { get; set; } 60 public static readonly string OutgoingTransferVersionName = "SIMULATION";
61 61
62 /// <summary> 62 /// <summary>
63 /// Determine the maximum entity transfer version we will use for teleports. 63 /// Determine the entity transfer version we will use for teleports.
64 /// </summary> 64 /// </summary>
65 private float MaxOutgoingTransferVersion { get; set; } 65 public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
66 66
67 private string m_myVersion = ""; 67 private string m_myVersion = "";
68 /// <summary> 68 /// <summary>
@@ -215,9 +215,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
215 /// <param name="source"></param> 215 /// <param name="source"></param>
216 protected virtual void InitialiseCommon(IConfigSource source) 216 protected virtual void InitialiseCommon(IConfigSource source)
217 { 217 {
218 string transferVersionName = "SIMULATION";
219 float maxTransferVersion = 0.3f;
220
221 IConfig hypergridConfig = source.Configs["Hypergrid"]; 218 IConfig hypergridConfig = source.Configs["Hypergrid"];
222 if (hypergridConfig != null) 219 if (hypergridConfig != null)
223 { 220 {
@@ -233,33 +230,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
233 IConfig transferConfig = source.Configs["EntityTransfer"]; 230 IConfig transferConfig = source.Configs["EntityTransfer"];
234 if (transferConfig != null) 231 if (transferConfig != null)
235 { 232 {
236 string rawVersion
237 = transferConfig.GetString(
238 "MaxOutgoingTransferVersion",
239 string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
240
241 string[] rawVersionComponents = rawVersion.Split(new char[] { '/' });
242
243 bool versionValid = false;
244
245 if (rawVersionComponents.Length >= 2)
246 versionValid = float.TryParse(rawVersionComponents[1], out maxTransferVersion);
247
248 if (!versionValid)
249 {
250 m_log.ErrorFormat(
251 "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion {0} is invalid, using {1}",
252 rawVersion, string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
253 }
254 else
255 {
256 transferVersionName = rawVersionComponents[0];
257
258 m_log.InfoFormat(
259 "[ENTITY TRANSFER MODULE]: MaxOutgoingTransferVersion set to {0}",
260 string.Format("{0}/{1}", transferVersionName, maxTransferVersion));
261 }
262
263 DisableInterRegionTeleportCancellation 233 DisableInterRegionTeleportCancellation
264 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false); 234 = transferConfig.GetBoolean("DisableInterRegionTeleportCancellation", false);
265 235
@@ -273,10 +243,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
273 MaxTransferDistance = DefaultMaxTransferDistance; 243 MaxTransferDistance = DefaultMaxTransferDistance;
274 } 244 }
275 245
276 OutgoingTransferVersionName = transferVersionName; 246 m_myVersion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
277 MaxOutgoingTransferVersion = maxTransferVersion;
278
279 m_myVersion = string.Format("{0}/{1}", OutgoingTransferVersionName, MaxOutgoingTransferVersion);
280 247
281 m_entityTransferStateMachine = new EntityTransferStateMachine(this); 248 m_entityTransferStateMachine = new EntityTransferStateMachine(this);
282 249
@@ -789,8 +756,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
789 m_interRegionTeleportAttempts.Value++; 756 m_interRegionTeleportAttempts.Value++;
790 757
791 m_log.DebugFormat( 758 m_log.DebugFormat(
792 "[ENTITY TRANSFER MODULE]: {0} max transfer version is {1}/{2}, {3} max version is {4}", 759 "[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}",
793 sp.Scene.Name, OutgoingTransferVersionName, MaxOutgoingTransferVersion, finalDestination.RegionName, version); 760 sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version);
794 761
795 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 762 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
796 // both regions 763 // both regions
@@ -877,7 +844,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
877 if (versionComponents.Length >= 2) 844 if (versionComponents.Length >= 2)
878 float.TryParse(versionComponents[1], out versionNumber); 845 float.TryParse(versionComponents[1], out versionNumber);
879 846
880 if (versionNumber >= 0.2f && MaxOutgoingTransferVersion >= versionNumber) 847 if (versionNumber >= 0.2f)
881 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , version, out reason); 848 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , version, out reason);
882 else 849 else
883 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, version, out reason); 850 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, version, out reason);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index 9d4c282..de0ae4c 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -48,11 +48,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
48 /// <summary> 48 /// <summary>
49 /// Version of this service. 49 /// Version of this service.
50 /// </summary> 50 /// </summary>
51 /// <remarks>
52 /// Currently valid versions are "SIMULATION/0.1" and "SIMULATION/0.2"
53 /// </remarks>
54 public string ServiceVersion { get; set; } 51 public string ServiceVersion { get; set; }
55 private float m_VersionNumber = 0.3f;
56 52
57 /// <summary> 53 /// <summary>
58 /// Map region ID to scene. 54 /// Map region ID to scene.
@@ -85,22 +81,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
85 81
86 public void InitialiseService(IConfigSource configSource) 82 public void InitialiseService(IConfigSource configSource)
87 { 83 {
88 ServiceVersion = "SIMULATION/0.3"; 84 ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
89 IConfig config = configSource.Configs["SimulationService"]; 85 m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
90 if (config != null)
91 {
92 ServiceVersion = config.GetString("ConnectorProtocolVersion", ServiceVersion);
93
94 if (ServiceVersion != "SIMULATION/0.1" && ServiceVersion != "SIMULATION/0.2" && ServiceVersion != "SIMULATION/0.3")
95 throw new Exception(string.Format("Invalid ConnectorProtocolVersion {0}", ServiceVersion));
96
97 string[] versionComponents = ServiceVersion.Split(new char[] { '/' });
98 if (versionComponents.Length >= 2)
99 float.TryParse(versionComponents[1], out m_VersionNumber);
100
101 m_log.InfoFormat(
102 "[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
103 }
104 } 86 }
105 87
106 public void PostInitialise() 88 public void PostInitialise()