From 9ba5a7e190497be05a4e1f54ba3140366750277a Mon Sep 17 00:00:00 2001
From: Latif Khalifa
Date: Sun, 17 Nov 2013 13:43:05 +0100
Subject: Normalize viewer version string to accomodate new style version
reporting in the viewers
---
OpenSim/Framework/AgentCircuitData.cs | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index ffcc584..acf925a 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -128,7 +128,30 @@ namespace OpenSim.Framework
///
/// Viewer's version string as reported by the viewer at login
///
- public string Viewer;
+ private string ViewerInternal;
+
+ ///
+ /// Viewer's version string
+ ///
+ 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;
+ }
+ }
+ }
///
/// The channel strinf sent by the viewer at login
--
cgit v1.1