aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTom Grimshaw2010-05-17 14:14:19 -0700
committerTom Grimshaw2010-05-17 14:14:19 -0700
commit8f838c722da978da646fcef59a5af767840832bb (patch)
tree83b22c669659e26a16ca14a8ad6b6c292b805af1 /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC_OLD-8f838c722da978da646fcef59a5af767840832bb.zip
opensim-SC_OLD-8f838c722da978da646fcef59a5af767840832bb.tar.gz
opensim-SC_OLD-8f838c722da978da646fcef59a5af767840832bb.tar.bz2
opensim-SC_OLD-8f838c722da978da646fcef59a5af767840832bb.tar.xz
When killing a zombie session, don't send the stop packet since it often has the effect of killing a newly connected client.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs10
-rw-r--r--OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs5
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs5
-rw-r--r--OpenSim/Framework/IClientAPI.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs18
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs5
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs5
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs4
10 files changed, 55 insertions, 5 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 1d6d4c1..12989f5 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -835,10 +835,18 @@ namespace OpenSim.Client.MXP.ClientStack
835 835
836 public void Close() 836 public void Close()
837 { 837 {
838 Close(true);
839 }
840
841 public void Close(bool sendStop)
842 {
838 m_log.Info("[MXP ClientStack] Close Called"); 843 m_log.Info("[MXP ClientStack] Close Called");
839 844
840 // Tell the client to go 845 // Tell the client to go
841 SendLogoutPacket(); 846 if (sendStop == true)
847 {
848 SendLogoutPacket();
849 }
842 850
843 // Let MXPPacketServer clean it up 851 // Let MXPPacketServer clean it up
844 if (Session.SessionState != SessionState.Disconnected) 852 if (Session.SessionState != SessionState.Disconnected)
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
index 43c64e9..c4b5c87 100644
--- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
+++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs
@@ -446,6 +446,11 @@ namespace OpenSim.Client.Sirikata.ClientStack
446 446
447 public void Close() 447 public void Close()
448 { 448 {
449 Close(true);
450 }
451
452 public void Close(bool sendStop)
453 {
449 throw new System.NotImplementedException(); 454 throw new System.NotImplementedException();
450 } 455 }
451 456
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 864b4f1..39a16bc 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -452,6 +452,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
452 452
453 public void Close() 453 public void Close()
454 { 454 {
455 Close(true);
456 }
457
458 public void Close(bool sendStop)
459 {
455 throw new System.NotImplementedException(); 460 throw new System.NotImplementedException();
456 } 461 }
457 462
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 01daeb1..c597d62 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1114,6 +1114,7 @@ namespace OpenSim.Framework
1114 void InPacket(object NewPack); 1114 void InPacket(object NewPack);
1115 void ProcessInPacket(Packet NewPack); 1115 void ProcessInPacket(Packet NewPack);
1116 void Close(); 1116 void Close();
1117 void Close(bool sendStop);
1117 void Kick(string message); 1118 void Kick(string message);
1118 1119
1119 /// <summary> 1120 /// <summary>
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d5fda9d..5670a78 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -502,18 +502,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
502 502
503 #region Client Methods 503 #region Client Methods
504 504
505
505 /// <summary> 506 /// <summary>
506 /// Shut down the client view 507 /// Shut down the client view
507 /// </summary> 508 /// </summary>
508 public void Close() 509 public void Close()
509 { 510 {
511 Close(true);
512 }
513
514 /// <summary>
515 /// Shut down the client view
516 /// </summary>
517 public void Close(bool sendStop)
518 {
510 m_log.DebugFormat( 519 m_log.DebugFormat(
511 "[CLIENT]: Close has been called for {0} attached to scene {1}", 520 "[CLIENT]: Close has been called for {0} attached to scene {1}",
512 Name, m_scene.RegionInfo.RegionName); 521 Name, m_scene.RegionInfo.RegionName);
513 522
514 // Send the STOP packet 523 if (sendStop)
515 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); 524 {
516 OutPacket(disable, ThrottleOutPacketType.Unknown); 525 // Send the STOP packet
526 DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
527 OutPacket(disable, ThrottleOutPacketType.Unknown);
528 }
517 529
518 IsActive = false; 530 IsActive = false;
519 531
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 09611af..84385ad 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -831,6 +831,11 @@ namespace OpenSim.Region.Examples.SimpleModule
831 831
832 public void Close() 832 public void Close()
833 { 833 {
834 Close(true);
835 }
836
837 public void Close(bool sendStop)
838 {
834 } 839 }
835 840
836 public void Start() 841 public void Start()
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3d59615..1b08c50 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3489,7 +3489,7 @@ namespace OpenSim.Region.Framework.Scenes
3489 { 3489 {
3490 // We have a zombie from a crashed session. Kill it. 3490 // We have a zombie from a crashed session. Kill it.
3491 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName); 3491 m_log.DebugFormat("[SCENE]: Zombie scene presence detected for {0} in {1}", agent.AgentID, RegionInfo.RegionName);
3492 sp.ControllingClient.Close(); 3492 sp.ControllingClient.Close(false);
3493 } 3493 }
3494 } 3494 }
3495 3495
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 69e78b3..7c0fe4c 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -885,6 +885,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
885 885
886 public void Close() 886 public void Close()
887 { 887 {
888 Close(true);
889 }
890
891 public void Close(bool sendStop)
892 {
888 Disconnect(); 893 Disconnect();
889 } 894 }
890 895
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 6360c99..4323c94 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -845,6 +845,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
845 845
846 public void Close() 846 public void Close()
847 { 847 {
848 Close(true);
849 }
850
851 public void Close(bool sendStop)
852 {
848 } 853 }
849 854
850 public void Start() 855 public void Start()
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index b07a072..05a8ff0 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -888,6 +888,10 @@ namespace OpenSim.Tests.Common.Mock
888 888
889 public void Close() 889 public void Close()
890 { 890 {
891 Close(true);
892 }
893 public void Close(bool sendStop)
894 {
891 m_scene.RemoveClient(AgentId); 895 m_scene.RemoveClient(AgentId);
892 } 896 }
893 897