aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs12
-rw-r--r--OpenSim/Framework/IScene.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs23
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneBase.cs5
5 files changed, 51 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index e5a943b..dbf9276 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -427,6 +427,8 @@ namespace OpenSim.Framework.UserManagement
427 427
428 if (userProfile != null) 428 if (userProfile != null)
429 { 429 {
430 // This line needs to be in side the above if statement or the UserServer will crash on some logouts.
431 m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")");
430 432
431 userAgent = userProfile.currentAgent; 433 userAgent = userProfile.currentAgent;
432 if (userAgent != null) 434 if (userAgent != null)
@@ -434,7 +436,10 @@ namespace OpenSim.Framework.UserManagement
434 userAgent.agentOnline = false; 436 userAgent.agentOnline = false;
435 userAgent.logoutTime = Util.UnixTimeSinceEpoch(); 437 userAgent.logoutTime = Util.UnixTimeSinceEpoch();
436 userAgent.sessionID = LLUUID.Zero; 438 userAgent.sessionID = LLUUID.Zero;
437 userAgent.currentRegion = regionid; 439 if (regionid != null)
440 {
441 userAgent.currentRegion = regionid;
442 }
438 userAgent.currentHandle = regionhandle; 443 userAgent.currentHandle = regionhandle;
439 444
440 userAgent.currentPos = currentPos; 445 userAgent.currentPos = currentPos;
@@ -446,9 +451,10 @@ namespace OpenSim.Framework.UserManagement
446 } 451 }
447 else 452 else
448 { 453 {
449 m_log.Info("[LOGOUT]: didn't save logout position, currentAgent: " + userAgent.ToString() ); 454 // If currentagent is null, we can't reference it here or the UserServer crashes!
455 m_log.Info("[LOGOUT]: didn't save logout position: " + userid.ToString());
450 } 456 }
451 m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" ); 457
452 } 458 }
453 else 459 else
454 { 460 {
diff --git a/OpenSim/Framework/IScene.cs b/OpenSim/Framework/IScene.cs
index 96cb21e..3445050 100644
--- a/OpenSim/Framework/IScene.cs
+++ b/OpenSim/Framework/IScene.cs
@@ -52,6 +52,8 @@ namespace OpenSim.Framework
52 void Restart(int seconds); 52 void Restart(int seconds);
53 bool OtherRegionUp(RegionInfo thisRegion); 53 bool OtherRegionUp(RegionInfo thisRegion);
54 54
55 string GetSimulatorVersion();
56
55 RegionInfo RegionInfo { get; } 57 RegionInfo RegionInfo { get; }
56 uint NextLocalId { get; } 58 uint NextLocalId { get; }
57 59
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 1717825..d7f4c3d 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.ClientStack
87 private readonly uint m_circuitCode; 87 private readonly uint m_circuitCode;
88 private int m_moneyBalance; 88 private int m_moneyBalance;
89 89
90 private readonly byte[] m_channelVersion = new byte[] { 0x00 }; // Dummy value needed by libSL 90 private byte[] m_channelVersion = Helpers.StringToField("OpenSimulator 0.5"); // Dummy value needed by libSL
91 91
92 /* protected variables */ 92 /* protected variables */
93 93
@@ -196,6 +196,8 @@ namespace OpenSim.Region.ClientStack
196 { 196 {
197 m_moneyBalance = 1000; 197 m_moneyBalance = 1000;
198 198
199 m_channelVersion = Helpers.StringToField(scene.GetSimulatorVersion());
200
199 m_scene = scene; 201 m_scene = scene;
200 m_assetCache = assetCache; 202 m_assetCache = assetCache;
201 203
@@ -609,8 +611,16 @@ namespace OpenSim.Region.ClientStack
609 { 611 {
610 RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); 612 RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
611 613
614 bool estatemanager = false;
615 LLUUID[] EstateManagers = regionInfo.EstateSettings.estateManagers;
616 for (int i = 0; i < EstateManagers.Length; i++)
617 {
618 if (EstateManagers[i] == AgentId)
619 estatemanager = true;
620 }
621
612 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; 622 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
613 handshake.RegionInfo.IsEstateManager = false; 623 handshake.RegionInfo.IsEstateManager = estatemanager;
614 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.EstateSettings.terrainHeightRange0; 624 handshake.RegionInfo.TerrainHeightRange00 = regionInfo.EstateSettings.terrainHeightRange0;
615 handshake.RegionInfo.TerrainHeightRange01 = regionInfo.EstateSettings.terrainHeightRange1; 625 handshake.RegionInfo.TerrainHeightRange01 = regionInfo.EstateSettings.terrainHeightRange1;
616 handshake.RegionInfo.TerrainHeightRange10 = regionInfo.EstateSettings.terrainHeightRange2; 626 handshake.RegionInfo.TerrainHeightRange10 = regionInfo.EstateSettings.terrainHeightRange2;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 3fafaf4..a4f5028 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -82,6 +82,8 @@ namespace OpenSim.Region.Environment.Scenes
82 private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing 82 private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing
83 private int m_incrementsof15seconds = 0; 83 private int m_incrementsof15seconds = 0;
84 84
85 public string m_simulatorVersion = "OpenSimulator 0.5";
86
85 protected ModuleLoader m_moduleLoader; 87 protected ModuleLoader m_moduleLoader;
86 protected StorageManager m_storageManager; 88 protected StorageManager m_storageManager;
87 protected AgentCircuitManager m_authenticateHandler; 89 protected AgentCircuitManager m_authenticateHandler;
@@ -300,6 +302,22 @@ namespace OpenSim.Region.Environment.Scenes
300 302
301 m_statsReporter = new SimStatsReporter(regInfo); 303 m_statsReporter = new SimStatsReporter(regInfo);
302 m_statsReporter.OnSendStatsResult += SendSimStatsPackets; 304 m_statsReporter.OnSendStatsResult += SendSimStatsPackets;
305 string OSString = "";
306
307 if (System.Environment.OSVersion.Platform != PlatformID.Unix)
308 {
309 OSString = System.Environment.OSVersion.ToString();
310 }
311 else
312 {
313 OSString = Util.ReadEtcIssue();
314 }
315 if (OSString.Length > 45)
316 {
317 OSString = OSString.Substring(0,45);
318 }
319
320 m_simulatorVersion = "OpenSimulator v0.5-SVN on " + OSString + " ChilTasks:" + m_sendTasksToChild.ToString() + " PhysPrim:" + m_physicalPrim.ToString();
303 } 321 }
304 322
305 #endregion 323 #endregion
@@ -313,6 +331,11 @@ namespace OpenSim.Region.Environment.Scenes
313 m_eventManager.OnPermissionError += SendPermissionAlert; 331 m_eventManager.OnPermissionError += SendPermissionAlert;
314 } 332 }
315 333
334 public override string GetSimulatorVersion()
335 {
336 return m_simulatorVersion;
337 }
338
316 public override bool OtherRegionUp(RegionInfo otherRegion) 339 public override bool OtherRegionUp(RegionInfo otherRegion)
317 { 340 {
318 // Another region is up. 341 // Another region is up.
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs
index 2e95322..e39fa9f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs
@@ -167,6 +167,11 @@ namespace OpenSim.Region.Environment.Scenes
167 } 167 }
168 public abstract bool OtherRegionUp(RegionInfo thisRegion); 168 public abstract bool OtherRegionUp(RegionInfo thisRegion);
169 169
170 public virtual string GetSimulatorVersion()
171 {
172 return "OpenSimulator v0.5 SVN";
173 }
174
170 #endregion 175 #endregion
171 176
172 #region Shutdown 177 #region Shutdown