From 6bc7e3429f9ac6cb57fbaa695223c3d76c189f77 Mon Sep 17 00:00:00 2001
From: Tom Grimshaw
Date: Mon, 17 May 2010 14:14:19 -0700
Subject: Provide interface to prevent the client close function from sending
the stop packet
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 18 +++++++++++++++---
OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 5 +++++
.../InternetRelayClientView/Server/IRCClientView.cs | 5 +++++
OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++
4 files changed, 30 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 5c774b5..960e0a2 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -470,18 +470,30 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Client Methods
+
///
/// Shut down the client view
///
public void Close()
{
+ Close(true);
+ }
+
+ ///
+ /// Shut down the client view
+ ///
+ public void Close(bool sendStop)
+ {
m_log.DebugFormat(
"[CLIENT]: Close has been called for {0} attached to scene {1}",
Name, m_scene.RegionInfo.RegionName);
- // Send the STOP packet
- DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
- OutPacket(disable, ThrottleOutPacketType.Unknown);
+ if (sendStop)
+ {
+ // Send the STOP packet
+ DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator);
+ OutPacket(disable, ThrottleOutPacketType.Unknown);
+ }
IsActive = false;
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index d2b0161..b074313 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -825,6 +825,11 @@ namespace OpenSim.Region.Examples.SimpleModule
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
}
public void Start()
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 85e3fb3..0b6647d 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -877,6 +877,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
Disconnect();
}
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index cf2076f..938293f 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -838,6 +838,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
public void Close()
{
+ Close(true);
+ }
+
+ public void Close(bool sendStop)
+ {
}
public void Start()
--
cgit v1.1