mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
* Implement basic region filtering as described in https://lists.berlios.de/pipermail/opensim-dev/2008-November/003468.html
* This is done by sending a 'major interface version' number on sim registration. Developers must increment this every time they make a change that would make the previous OpenSim revision failure incompatible with the new one (non-fatal incompatibilities are fine). * This number resides in OpenSim.Framework.Servers.VersionInfo.MajorInterfaceVersion * This allows the grid service to stop older, incompatible regions from connecting
This commit is contained in:
@@ -428,25 +428,6 @@ namespace OpenSim.Framework.Servers
|
||||
}
|
||||
|
||||
m_version += string.IsNullOrEmpty(buildVersion) ? " " : ("." + buildVersion + " ").Substring(0, 6);
|
||||
|
||||
// Add operating system information if available
|
||||
string OSString = "";
|
||||
|
||||
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
|
||||
{
|
||||
OSString = System.Environment.OSVersion.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
OSString = Util.ReadEtcIssue();
|
||||
}
|
||||
|
||||
if (OSString.Length > 45)
|
||||
{
|
||||
OSString = OSString.Substring(0, 45);
|
||||
}
|
||||
|
||||
m_version += " (OS " + OSString + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,11 +27,27 @@
|
||||
|
||||
namespace OpenSim
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
|
||||
/// </summary>
|
||||
public class VersionInfo
|
||||
{
|
||||
/// <value>
|
||||
/// This is the OpenSim version string. Change this if you are releasing a new OpenSim version.
|
||||
/// </value>
|
||||
public readonly static string Version = "OpenSimulator Server 0.6.0"; // stay with 27 chars (used in regioninfo)
|
||||
|
||||
/// <value>
|
||||
/// This is the external interface version. It is separate from the OpenSimulator project version.
|
||||
///
|
||||
/// This version number should be
|
||||
/// increased by 1 every time a code change makes the previous OpenSimulator revision incompatible
|
||||
/// with the new revision. This will usually be due to interregion or grid facing interface changes.
|
||||
///
|
||||
/// Changes which are compatible with an older revision (e.g. older revisions experience degraded functionality
|
||||
/// but not outright failure) do not need a version number increment.
|
||||
///
|
||||
/// Having this version number allows the grid service to reject connections from regions running a version
|
||||
/// of the code that is too old.
|
||||
///
|
||||
/// </value>
|
||||
public readonly static int MajorInterfaceVersion = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,6 +799,33 @@ namespace OpenSim.Framework
|
||||
x += rx;
|
||||
y += ry;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get operating system information if available. Returns only the first 45 characters of information
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// Operating system information. Returns an empty string if none was available.
|
||||
/// </returns>
|
||||
public static string GetOperatingSystemInformation()
|
||||
{
|
||||
string os = String.Empty;
|
||||
|
||||
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
|
||||
{
|
||||
os = System.Environment.OSVersion.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
os = ReadEtcIssue();
|
||||
}
|
||||
|
||||
if (os.Length > 45)
|
||||
{
|
||||
os = os.Substring(0, 45);
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the given string a UUID?
|
||||
|
||||
Reference in New Issue
Block a user