aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-31 20:35:12 +0000
committerJustin Clarke Casey2008-05-31 20:35:12 +0000
commit8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6 (patch)
treec19c5ea998f73ea195542ce3650782baa226e972 /OpenSim/Region/Application/OpenSimMain.cs
parent* Made UpdateUserCurrentRegion a bit more forgiving. (diff)
downloadopensim-SC_OLD-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.zip
opensim-SC_OLD-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.tar.gz
opensim-SC_OLD-8cb5ec5fdd21ac3ace385d67145dad8d462ebcb6.tar.bz2
opensim-SC_OLD-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/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs71
1 files changed, 3 insertions, 68 deletions
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;