Normalize viewer version string to accomodate new style version reporting in the viewers
parent
f94d07f2e2
commit
9ba5a7e190
|
@ -128,7 +128,30 @@ namespace OpenSim.Framework
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Viewer's version string as reported by the viewer at login
|
/// Viewer's version string as reported by the viewer at login
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Viewer;
|
private string ViewerInternal;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Viewer's version string
|
||||||
|
/// </summary>
|
||||||
|
public string Viewer
|
||||||
|
{
|
||||||
|
set { ViewerInternal = value; }
|
||||||
|
// Try to return consistent viewer string taking into account
|
||||||
|
// that viewers have chaagned how version is reported
|
||||||
|
// See http://opensimulator.org/mantis/view.php?id=6851
|
||||||
|
get
|
||||||
|
{
|
||||||
|
// Old style version string contains viewer name followed by a space followed by a version number
|
||||||
|
if (ViewerInternal.Contains(" "))
|
||||||
|
{
|
||||||
|
return ViewerInternal;
|
||||||
|
}
|
||||||
|
else // New style version contains no spaces, just version number
|
||||||
|
{
|
||||||
|
return Channel + " " + ViewerInternal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The channel strinf sent by the viewer at login
|
/// The channel strinf sent by the viewer at login
|
||||||
|
|
Loading…
Reference in New Issue