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...)
parent
ea56f4f27c
commit
19e5667451
|
@ -190,14 +190,24 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||||
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
version = theirVersion;
|
version = theirVersion;
|
||||||
|
outboundVersion = version;
|
||||||
if (version < VersionInfo.SimulationServiceVersionAcceptedMin ||
|
inboundVersion = version;
|
||||||
version > VersionInfo.SimulationServiceVersionAcceptedMax )
|
|
||||||
|
if (outboundVersion < VersionInfo.SimulationServiceVersionAcceptedMin ||
|
||||||
|
outboundVersion > VersionInfo.SimulationServiceVersionAcceptedMax )
|
||||||
{
|
{
|
||||||
resp["success"] = OSD.FromBoolean(false);
|
resp["success"] = OSD.FromBoolean(false);
|
||||||
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));
|
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));
|
||||||
|
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (inboundVersion > VersionInfo.SimulationServiceVersionSupportedMax ||
|
||||||
|
inboundVersion < VersionInfo.SimulationServiceVersionSupportedMin)
|
||||||
|
{
|
||||||
|
resp["success"] = OSD.FromBoolean(false);
|
||||||
|
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));
|
||||||
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
responsedata["str_response_string"] = OSDParser.SerializeJsonString(resp, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -239,6 +249,8 @@ namespace OpenSim.Server.Handlers.Simulation
|
||||||
{
|
{
|
||||||
// If the single version can't resolve, fall back to safest. This will only affect very old regions.
|
// If the single version can't resolve, fall back to safest. This will only affect very old regions.
|
||||||
version = 0.1f;
|
version = 0.1f;
|
||||||
|
outboundVersion = version;
|
||||||
|
inboundVersion = version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue