aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-31 21:50:24 +0000
committerUbitUmarov2015-10-31 21:50:24 +0000
commit19e5667451dc763eb90a78533c4fe7f51c49f9a0 (patch)
tree9b7b5af985f6b23cb330d96c1e14472ef50d09ec /OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
parentIntroduce an EntityTransferContext carrying the version numbers to pass (diff)
downloadopensim-SC_OLD-19e5667451dc763eb90a78533c4fe7f51c49f9a0.zip
opensim-SC_OLD-19e5667451dc763eb90a78533c4fe7f51c49f9a0.tar.gz
opensim-SC_OLD-19e5667451dc763eb90a78533c4fe7f51c49f9a0.tar.bz2
opensim-SC_OLD-19e5667451dc763eb90a78533c4fe7f51c49f9a0.tar.xz
fix transfer protocol version in string format. Let that case have tests identical to new format (this still isnt for your babies keep them safe...)
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs22
1 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 5142514..a2920f9 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -190,14 +190,24 @@ namespace OpenSim.Server.Handlers.Simulation
190 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); 190 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
191 return; 191 return;
192 } 192 }
193 193
194 version = theirVersion; 194 version = theirVersion;
195 195 outboundVersion = version;
196 if (version < VersionInfo.SimulationServiceVersionAcceptedMin || 196 inboundVersion = version;
197 version > VersionInfo.SimulationServiceVersionAcceptedMax ) 197
198 if (outboundVersion < VersionInfo.SimulationServiceVersionAcceptedMin ||
199 outboundVersion > VersionInfo.SimulationServiceVersionAcceptedMax )
200 {
201 resp["success"] = OSD.FromBoolean(false);
202 resp["reason"] = OSD.FromString(String.Format("Your region provide protocol version {0} and we accept only {1} - {2}. No version overlap.", outboundVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax));
203 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
204 return;
205 }
206 if (inboundVersion > VersionInfo.SimulationServiceVersionSupportedMax ||
207 inboundVersion < VersionInfo.SimulationServiceVersionSupportedMin)
198 { 208 {
199 resp["success"] = OSD.FromBoolean(false); 209 resp["success"] = OSD.FromBoolean(false);
200 resp["reason"] = OSD.FromString(String.Format("Your region protocol version is {0} and we accept only {1} - {2}. No version overlap.", theirVersion, VersionInfo.SimulationServiceVersionAcceptedMin, VersionInfo.SimulationServiceVersionAcceptedMax)); 210 resp["reason"] = OSD.FromString(String.Format("You require region protocol version {0} and we provide only {2} - {3}. No version overlap.", inboundVersion, VersionInfo.SimulationServiceVersionSupportedMin, VersionInfo.SimulationServiceVersionSupportedMax));
201 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true); 211 responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
202 return; 212 return;
203 } 213 }
@@ -239,6 +249,8 @@ namespace OpenSim.Server.Handlers.Simulation
239 { 249 {
240 // If the single version can't resolve, fall back to safest. This will only affect very old regions. 250 // If the single version can't resolve, fall back to safest. This will only affect very old regions.
241 version = 0.1f; 251 version = 0.1f;
252 outboundVersion = version;
253 inboundVersion = version;
242 } 254 }
243 } 255 }
244 256