aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2013-01-23 23:12:48 +0100
committerMelanie2013-01-23 23:12:48 +0100
commit8c6984eac140ed48f10ac3f3db533d0c9b1d084a (patch)
tree46db4ae698cff50e4716011241723d249837cf8e /OpenSim
parentPrevent double ground collisions and prefer the physics result if there is one. (diff)
downloadopensim-SC_OLD-8c6984eac140ed48f10ac3f3db533d0c9b1d084a.zip
opensim-SC_OLD-8c6984eac140ed48f10ac3f3db533d0c9b1d084a.tar.gz
opensim-SC_OLD-8c6984eac140ed48f10ac3f3db533d0c9b1d084a.tar.bz2
opensim-SC_OLD-8c6984eac140ed48f10ac3f3db533d0c9b1d084a.tar.xz
Implement get version RemoteAdmin call
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs16
-rw-r--r--OpenSim/Framework/Servers/ServerBase.cs4
2 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 9f3844b..49fc566 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -70,6 +70,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
70 70
71 private string m_name = "RemoteAdminPlugin"; 71 private string m_name = "RemoteAdminPlugin";
72 private string m_version = "0.0"; 72 private string m_version = "0.0";
73 private string m_openSimVersion;
73 74
74 public string Version 75 public string Version
75 { 76 {
@@ -89,6 +90,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
89 90
90 public void Initialise(OpenSimBase openSim) 91 public void Initialise(OpenSimBase openSim)
91 { 92 {
93 m_openSimVersion = openSim.GetVersionText();
94
92 m_configSource = openSim.ConfigSource.Source; 95 m_configSource = openSim.ConfigSource.Source;
93 try 96 try
94 { 97 {
@@ -159,6 +162,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
159 162
160 // Misc 163 // Misc
161 availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); 164 availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch);
165 availableMethods["admin_get_opensim_version"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcGetOpenSimVersion);
162 166
163 // Either enable full remote functionality or just selected features 167 // Either enable full remote functionality or just selected features
164 string enabledMethods = m_config.GetString("enabled_methods", "all"); 168 string enabledMethods = m_config.GetString("enabled_methods", "all");
@@ -1977,6 +1981,18 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1977 m_log.Info("[RADMIN]: Refresh Search Request complete"); 1981 m_log.Info("[RADMIN]: Refresh Search Request complete");
1978 } 1982 }
1979 1983
1984 private void XmlRpcGetOpenSimVersion(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient)
1985 {
1986 m_log.Info("[RADMIN]: Received Get OpenSim Version Request");
1987
1988 Hashtable responseData = (Hashtable)response.Value;
1989
1990 responseData["version"] = m_openSimVersion;
1991 responseData["success"] = true;
1992
1993 m_log.Info("[RADMIN]: Get OpenSim Version Request complete");
1994 }
1995
1980 /// <summary> 1996 /// <summary>
1981 /// Parse a float with the given parameter name from a request data hash table. 1997 /// Parse a float with the given parameter name from a request data hash table.
1982 /// </summary> 1998 /// </summary>
diff --git a/OpenSim/Framework/Servers/ServerBase.cs b/OpenSim/Framework/Servers/ServerBase.cs
index c182a3a..9eb2281 100644
--- a/OpenSim/Framework/Servers/ServerBase.cs
+++ b/OpenSim/Framework/Servers/ServerBase.cs
@@ -531,7 +531,7 @@ namespace OpenSim.Framework.Servers
531 } 531 }
532 } 532 }
533 533
534 protected string GetVersionText() 534 public string GetVersionText()
535 { 535 {
536 return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion); 536 return String.Format("Version: {0} (interface version {1})", m_version, VersionInfo.MajorInterfaceVersion);
537 } 537 }
@@ -563,4 +563,4 @@ namespace OpenSim.Framework.Servers
563 m_console.OutputFormat(format, components); 563 m_console.OutputFormat(format, components);
564 } 564 }
565 } 565 }
566} \ No newline at end of file 566}