diff options
author | Justin Clarke Casey | 2008-05-22 00:32:04 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-22 00:32:04 +0000 |
commit | 203017f5540f801c25f8345dd8ca30f0bc4de2f8 (patch) | |
tree | fc15222a4207e9147e8ee39559cac8e827102a10 /OpenSim | |
parent | * Fix circular dependency from last checkin by passing version as a parameter... (diff) | |
download | opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.zip opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.gz opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.bz2 opensim-SC_OLD-203017f5540f801c25f8345dd8ca30f0bc4de2f8.tar.xz |
* Refactor: Move enhancement of version string with operating system information from Scene to OpenSimMain
* This also means the operating system info will show up in the region console (and hence the logs)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 17 |
3 files changed, 25 insertions, 23 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 4031634..eb44dca 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -346,12 +346,11 @@ namespace OpenSim | |||
346 | } | 346 | } |
347 | 347 | ||
348 | /// <summary> | 348 | /// <summary> |
349 | /// Update the version string with extra information if it's available. | 349 | /// Enhance the version string with extra information if it's available. |
350 | /// This currently means adding a subversion number if the root .svn/entries file is present. | ||
351 | /// </summary> | 350 | /// </summary> |
352 | protected void updateAvailableVersionInformation() | 351 | protected void enhanceVersionInformation() |
353 | { | 352 | { |
354 | // Set BuildVersion String for Show version command | 353 | // Add subversion revision information if available |
355 | string svnFileName = "../.svn/entries"; | 354 | string svnFileName = "../.svn/entries"; |
356 | string inputLine; | 355 | string inputLine; |
357 | int strcmp; | 356 | int strcmp; |
@@ -380,7 +379,25 @@ namespace OpenSim | |||
380 | if (!string.IsNullOrEmpty(buildVersion)) | 379 | if (!string.IsNullOrEmpty(buildVersion)) |
381 | { | 380 | { |
382 | VersionInfo.Version += ", SVN build r" + buildVersion; | 381 | VersionInfo.Version += ", SVN build r" + buildVersion; |
382 | } | ||
383 | |||
384 | // Add operating system information if available | ||
385 | string OSString = ""; | ||
386 | |||
387 | if (System.Environment.OSVersion.Platform != PlatformID.Unix) | ||
388 | { | ||
389 | OSString = System.Environment.OSVersion.ToString(); | ||
383 | } | 390 | } |
391 | else | ||
392 | { | ||
393 | OSString = Util.ReadEtcIssue(); | ||
394 | } | ||
395 | if (OSString.Length > 45) | ||
396 | { | ||
397 | OSString = OSString.Substring(0, 45); | ||
398 | } | ||
399 | |||
400 | VersionInfo.Version += " on " + OSString; | ||
384 | } | 401 | } |
385 | 402 | ||
386 | /// <summary> | 403 | /// <summary> |
@@ -388,7 +405,8 @@ namespace OpenSim | |||
388 | /// </summary> | 405 | /// </summary> |
389 | protected void InternalStartUp() | 406 | protected void InternalStartUp() |
390 | { | 407 | { |
391 | updateAvailableVersionInformation(); | 408 | enhanceVersionInformation(); |
409 | |||
392 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); | 410 | m_log.Info("[STARTUP]: OpenSim version: " + VersionInfo.Version + "\n"); |
393 | 411 | ||
394 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 412 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e5fc384..435ed04 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -350,11 +350,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
350 | { | 350 | { |
351 | m_moneyBalance = 1000; | 351 | m_moneyBalance = 1000; |
352 | 352 | ||
353 | m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion()); | 353 | m_channelVersion = Helpers.StringToField("OpenSimulator Server " + scene.GetSimulatorVersion()); |
354 | 354 | ||
355 | InitDefaultAnimations(); | 355 | InitDefaultAnimations(); |
356 | 356 | ||
357 | |||
358 | m_scene = scene; | 357 | m_scene = scene; |
359 | m_assetCache = assetCache; | 358 | m_assetCache = assetCache; |
360 | 359 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index a980ce1..231c0dc 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -293,22 +293,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
293 | 293 | ||
294 | m_statsReporter.SetObjectCapacity(objectCapacity); | 294 | m_statsReporter.SetObjectCapacity(objectCapacity); |
295 | 295 | ||
296 | string OSString = ""; | 296 | m_simulatorVersion = simulatorVersion |
297 | |||
298 | if (System.Environment.OSVersion.Platform != PlatformID.Unix) | ||
299 | { | ||
300 | OSString = System.Environment.OSVersion.ToString(); | ||
301 | } | ||
302 | else | ||
303 | { | ||
304 | OSString = Util.ReadEtcIssue(); | ||
305 | } | ||
306 | if (OSString.Length > 45) | ||
307 | { | ||
308 | OSString = OSString.Substring(0, 45); | ||
309 | } | ||
310 | |||
311 | m_simulatorVersion = simulatorVersion + " on " + OSString | ||
312 | + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() | 297 | + " ChilTasks:" + m_seeIntoRegionFromNeighbor.ToString() |
313 | + " PhysPrim:" + m_physicalPrim.ToString(); | 298 | + " PhysPrim:" + m_physicalPrim.ToString(); |
314 | } | 299 | } |