diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Framework/ClientManager.cs | |
parent | * removed always true if (diff) | |
download | opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to 'OpenSim/Framework/ClientManager.cs')
-rw-r--r-- | OpenSim/Framework/ClientManager.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index e32c9eb..da60ed7 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -26,9 +26,11 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
33 | using OpenSim.Framework.Console; | ||
32 | 34 | ||
33 | namespace OpenSim.Framework | 35 | namespace OpenSim.Framework |
34 | { | 36 | { |
@@ -40,7 +42,6 @@ namespace OpenSim.Framework | |||
40 | 42 | ||
41 | public void ForEachClient(ForEachClientDelegate whatToDo) | 43 | public void ForEachClient(ForEachClientDelegate whatToDo) |
42 | { | 44 | { |
43 | |||
44 | // Wasteful, I know | 45 | // Wasteful, I know |
45 | IClientAPI[] LocalClients = new IClientAPI[0]; | 46 | IClientAPI[] LocalClients = new IClientAPI[0]; |
46 | lock (m_clients) | 47 | lock (m_clients) |
@@ -55,9 +56,11 @@ namespace OpenSim.Framework | |||
55 | { | 56 | { |
56 | whatToDo(LocalClients[i]); | 57 | whatToDo(LocalClients[i]); |
57 | } | 58 | } |
58 | catch (System.Exception e) | 59 | catch (Exception e) |
59 | { | 60 | { |
60 | OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString()); | 61 | MainLog.Instance.Warn("CLIENT", |
62 | "Unable to do ForEachClient for one of the clients" + "\n Reason: " + | ||
63 | e.ToString()); | ||
61 | } | 64 | } |
62 | } | 65 | } |
63 | } | 66 | } |
@@ -107,20 +110,19 @@ namespace OpenSim.Framework | |||
107 | IClientAPI client; | 110 | IClientAPI client; |
108 | try | 111 | try |
109 | { | 112 | { |
110 | |||
111 | if (m_clients.TryGetValue(circuits[i], out client)) | 113 | if (m_clients.TryGetValue(circuits[i], out client)) |
112 | { | 114 | { |
113 | Remove(client.CircuitCode); | 115 | Remove(client.CircuitCode); |
114 | client.Close(false); | 116 | client.Close(false); |
115 | } | 117 | } |
116 | } | 118 | } |
117 | catch (System.Exception e) | 119 | catch (Exception e) |
118 | { | 120 | { |
119 | OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", "Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " + e.ToString()); | 121 | MainLog.Instance.Error("CLIENT", |
122 | "Unable to shutdown circuit for: " + agentId.ToString() + "\n Reason: " + | ||
123 | e.ToString()); | ||
120 | } | 124 | } |
121 | } | 125 | } |
122 | |||
123 | |||
124 | } | 126 | } |
125 | 127 | ||
126 | private uint[] GetAllCircuits(LLUUID agentId) | 128 | private uint[] GetAllCircuits(LLUUID agentId) |
@@ -135,7 +137,7 @@ namespace OpenSim.Framework | |||
135 | } | 137 | } |
136 | 138 | ||
137 | 139 | ||
138 | for (int i = 0; i < LocalClients.Length; i++ ) | 140 | for (int i = 0; i < LocalClients.Length; i++) |
139 | { | 141 | { |
140 | if (LocalClients[i].AgentId == agentId) | 142 | if (LocalClients[i].AgentId == agentId) |
141 | { | 143 | { |
@@ -168,7 +170,6 @@ namespace OpenSim.Framework | |||
168 | packet.AgentData.SessionID = LocalClients[i].SessionId; | 170 | packet.AgentData.SessionID = LocalClients[i].SessionId; |
169 | LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task); | 171 | LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task); |
170 | } | 172 | } |
171 | |||
172 | } | 173 | } |
173 | } | 174 | } |
174 | 175 | ||