diff options
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 22 |
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 | ||