diff options
author | Justin Clarke Casey | 2008-05-31 20:35:12 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-31 20:35:12 +0000 |
commit | 8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6 (patch) | |
tree | c19c5ea998f73ea195542ce3650782baa226e972 /OpenSim/Region/Application | |
parent | * Made UpdateUserCurrentRegion a bit more forgiving. (diff) | |
download | opensim-SC-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.zip opensim-SC-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.tar.gz opensim-SC-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.tar.bz2 opensim-SC-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.tar.xz |
* Make version information common to all servers
* Now all servers respond to the "show version" command on the console
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 71 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMainConsole.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Application/VersionInfo.cs | 37 |
4 files changed, 4 insertions, 117 deletions
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index b2c710a..9aa885f 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -98,6 +98,7 @@ namespace OpenSim | |||
98 | } | 98 | } |
99 | 99 | ||
100 | private static bool _IsHandlingException = false; // Make sure we don't go recursive on ourself | 100 | private static bool _IsHandlingException = false; // Make sure we don't go recursive on ourself |
101 | |||
101 | /// <summary> | 102 | /// <summary> |
102 | /// Global exception handler -- all unhandlet exceptions end up here :) | 103 | /// Global exception handler -- all unhandlet exceptions end up here :) |
103 | /// </summary> | 104 | /// </summary> |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index d790e41..03dbf78 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -54,11 +54,6 @@ namespace OpenSim | |||
54 | { | 54 | { |
55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
56 | 56 | ||
57 | /// <summary> | ||
58 | /// Holds a human readable build version for this server. | ||
59 | /// </summary> | ||
60 | protected string buildVersion; | ||
61 | |||
62 | protected string proxyUrl; | 57 | protected string proxyUrl; |
63 | protected int proxyOffset = 0; | 58 | protected int proxyOffset = 0; |
64 | 59 | ||
@@ -359,72 +354,11 @@ namespace OpenSim | |||
359 | } | 354 | } |
360 | 355 | ||
361 | /// <summary> | 356 | /// <summary> |
362 | /// Enhance the version string with extra information if it's available. | ||
363 | /// </summary> | ||
364 | protected void EnhanceVersionInformation() | ||
365 | { | ||
366 | // Add subversion revision information if available | ||
367 | string svnFileName = "../.svn/entries"; | ||
368 | string inputLine; | ||
369 | int strcmp; | ||
370 | |||
371 | if (File.Exists(svnFileName)) | ||
372 | { | ||
373 | StreamReader EntriesFile = File.OpenText(svnFileName); | ||
374 | inputLine = EntriesFile.ReadLine(); | ||
375 | while (inputLine != null) | ||
376 | { | ||
377 | // using the dir svn revision at the top of entries file | ||
378 | strcmp = String.Compare(inputLine, "dir"); | ||
379 | if (strcmp == 0) | ||
380 | { | ||
381 | buildVersion = EntriesFile.ReadLine(); | ||
382 | break; | ||
383 | } | ||
384 | else | ||
385 | { | ||
386 | inputLine = EntriesFile.ReadLine(); | ||
387 | } | ||
388 | } | ||
389 | EntriesFile.Close(); | ||
390 | } | ||
391 | |||
392 | if (!string.IsNullOrEmpty(buildVersion)) | ||
393 | { | ||
394 | VersionInfo.Version += ", SVN build r" + buildVersion; | ||
395 | } | ||
396 | else | ||
397 | { | ||
398 | VersionInfo.Version += ", SVN build revision not available"; | ||
399 | } | ||
400 | |||
401 | // Add operating system information if available | ||
402 | string OSString = ""; | ||
403 | |||
404 | if (System.Environment.OSVersion.Platform != PlatformID.Unix) | ||
405 | { | ||
406 | OSString = System.Environment.OSVersion.ToString(); | ||
407 | } | ||
408 | else | ||
409 | { | ||
410 | OSString = Util.ReadEtcIssue(); | ||
411 | } | ||
412 | if (OSString.Length > 45) | ||
413 | { | ||
414 | OSString = OSString.Substring(0, 45); | ||
415 | } | ||
416 | |||
417 | VersionInfo.Version += ", OS " + OSString; | ||
418 | } | ||
419 | |||
420 | /// <summary> | ||
421 | /// Performs initialisation of the scene, such as loading configuration from disk. | 357 | /// Performs initialisation of the scene, such as loading configuration from disk. |
422 | /// </summary> | 358 | /// </summary> |
423 | protected void InternalStartUp() | 359 | protected void InternalStartUp() |
424 | { | 360 | { |
425 | EnhanceVersionInformation(); | 361 | m_log.Info("[STARTUP]: Version " + m_version + "\n"); |
426 | |||
427 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); | ||
428 | 362 | ||
429 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 363 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
430 | 364 | ||
@@ -658,13 +592,14 @@ namespace OpenSim | |||
658 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, | 592 | new Scene(regionInfo, circuitManager, m_commsManager, sceneGridService, m_assetCache, |
659 | storageManager, m_httpServer, | 593 | storageManager, m_httpServer, |
660 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config, | 594 | m_moduleLoader, m_dumpAssetsToFile, m_physicalPrim, m_see_into_region_from_neighbor, m_config, |
661 | VersionInfo.Version); | 595 | m_version); |
662 | 596 | ||
663 | } | 597 | } |
664 | 598 | ||
665 | public void handleRestartRegion(RegionInfo whichRegion) | 599 | public void handleRestartRegion(RegionInfo whichRegion) |
666 | { | 600 | { |
667 | m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); | 601 | m_log.Error("[OPENSIM MAIN]: Got restart signal from SceneManager"); |
602 | |||
668 | // Shutting down the client server | 603 | // Shutting down the client server |
669 | bool foundClientServer = false; | 604 | bool foundClientServer = false; |
670 | int clientServerElement = 0; | 605 | int clientServerElement = 0; |
diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index 7b1b477..467db14 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs | |||
@@ -253,7 +253,6 @@ namespace OpenSim | |||
253 | m_console.Notice("show assets - show state of asset cache."); | 253 | m_console.Notice("show assets - show state of asset cache."); |
254 | m_console.Notice("show users - show info about connected users."); | 254 | m_console.Notice("show users - show info about connected users."); |
255 | m_console.Notice("show modules - shows info about loaded modules."); | 255 | m_console.Notice("show modules - shows info about loaded modules."); |
256 | m_console.Notice("show version - show the running build version."); | ||
257 | m_console.Notice("show regions - show running region information."); | 256 | m_console.Notice("show regions - show running region information."); |
258 | m_console.Notice("threads - list threads"); | 257 | m_console.Notice("threads - list threads"); |
259 | m_console.Notice("config set section field value - set a config value"); | 258 | m_console.Notice("config set section field value - set a config value"); |
@@ -661,17 +660,6 @@ namespace OpenSim | |||
661 | scene.RegionInfo.RegionLocY); | 660 | scene.RegionInfo.RegionLocY); |
662 | }); | 661 | }); |
663 | break; | 662 | break; |
664 | |||
665 | case "version": | ||
666 | if (!string.IsNullOrEmpty(buildVersion)) | ||
667 | { | ||
668 | m_console.Notice("The build version is: r" + buildVersion); | ||
669 | } | ||
670 | else | ||
671 | { | ||
672 | m_console.Notice("The build version is not available"); | ||
673 | } | ||
674 | break; | ||
675 | } | 663 | } |
676 | } | 664 | } |
677 | 665 | ||
diff --git a/OpenSim/Region/Application/VersionInfo.cs b/OpenSim/Region/Application/VersionInfo.cs deleted file mode 100644 index 5e291f1..0000000 --- a/OpenSim/Region/Application/VersionInfo.cs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | namespace OpenSim | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// Exists purely to hold version information. | ||
32 | /// </summary> | ||
33 | public class VersionInfo | ||
34 | { | ||
35 | public static string Version = "trunk (post 0.5.7)"; | ||
36 | } | ||
37 | } | ||