aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/ClientManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ClientManager.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index de7708c..8422c17 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -36,11 +36,12 @@ namespace OpenSim.Framework
36 36
37 public class ClientManager 37 public class ClientManager
38 { 38 {
39 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
40
39 private Dictionary<uint, IClientAPI> m_clients; 41 private Dictionary<uint, IClientAPI> m_clients;
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)
@@ -57,7 +58,7 @@ namespace OpenSim.Framework
57 } 58 }
58 catch (System.Exception e) 59 catch (System.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 m_log.Warn("[CLIENT]: Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString());
61 } 62 }
62 } 63 }
63 } 64 }
@@ -116,11 +117,9 @@ namespace OpenSim.Framework
116 } 117 }
117 catch (System.Exception e) 118 catch (System.Exception e)
118 { 119 {
119 OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", string.Format("Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e)); 120 m_log.Error(string.Format("[CLIENT]: Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e));
120 } 121 }
121 } 122 }
122
123
124 } 123 }
125 124
126 private uint[] GetAllCircuits(LLUUID agentId) 125 private uint[] GetAllCircuits(LLUUID agentId)
@@ -134,7 +133,6 @@ namespace OpenSim.Framework
134 m_clients.Values.CopyTo(LocalClients, 0); 133 m_clients.Values.CopyTo(LocalClients, 0);
135 } 134 }
136 135
137
138 for (int i = 0; i < LocalClients.Length; i++ ) 136 for (int i = 0; i < LocalClients.Length; i++ )
139 { 137 {
140 if (LocalClients[i].AgentId == agentId) 138 if (LocalClients[i].AgentId == agentId)
@@ -160,7 +158,6 @@ namespace OpenSim.Framework
160 m_clients.Values.CopyTo(LocalClients, 0); 158 m_clients.Values.CopyTo(LocalClients, 0);
161 } 159 }
162 160
163
164 for (int i = 0; i < LocalClients.Length; i++) 161 for (int i = 0; i < LocalClients.Length; i++)
165 { 162 {
166 if (LocalClients[i].AgentId != sender.AgentId) 163 if (LocalClients[i].AgentId != sender.AgentId)