aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authordiva2009-02-11 21:07:41 +0000
committerdiva2009-02-11 21:07:41 +0000
commitb6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1 (patch)
treec7b8ebb8ce301eaacdb37929330252667143eddf /OpenSim/Framework
parent* minor: remove some mono compiler warnings (diff)
downloadopensim-SC-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.zip
opensim-SC-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.gz
opensim-SC-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.bz2
opensim-SC-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.xz
Enforce estate bans on Teleports.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AgentCircuitManager.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs
index 09333bd..56b40bd 100644
--- a/OpenSim/Framework/AgentCircuitManager.cs
+++ b/OpenSim/Framework/AgentCircuitManager.cs
@@ -81,13 +81,25 @@ namespace OpenSim.Framework
81 /// <param name="agentData"></param> 81 /// <param name="agentData"></param>
82 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) 82 public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData)
83 { 83 {
84 if (AgentCircuits.ContainsKey(circuitCode)) 84 lock (AgentCircuits)
85 { 85 {
86 AgentCircuits[circuitCode] = agentData; 86 if (AgentCircuits.ContainsKey(circuitCode))
87 {
88 AgentCircuits[circuitCode] = agentData;
89 }
90 else
91 {
92 AgentCircuits.Add(circuitCode, agentData);
93 }
87 } 94 }
88 else 95 }
96
97 public virtual void RemoveCircuit(uint circuitCode)
98 {
99 lock (AgentCircuits)
89 { 100 {
90 AgentCircuits.Add(circuitCode, agentData); 101 if (AgentCircuits.ContainsKey(circuitCode))
102 AgentCircuits.Remove(circuitCode);
91 } 103 }
92 } 104 }
93 105