From 85dd493614cda12488eb7920713ddda07c921dbc Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 9 Jul 2007 21:25:43 +0000 Subject: [PATCH] * some follow up renaming of members et c. --- OpenSim/Framework/General/ClientManager.cs | 8 ++++---- OpenSim/Region/Application/OpenSimMain.cs | 2 +- OpenSim/Region/ClientStack/PacketServer.cs | 8 ++++++-- .../Region/Environment/Scenes/Scene.PacketHandlers.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++----- OpenSim/Region/Environment/Scenes/SceneBase.cs | 2 +- OpenSim/Region/Examples/SimpleApp/MyWorld.cs | 4 ++-- OpenSim/Region/Examples/SimpleApp/Program.cs | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/OpenSim/Framework/General/ClientManager.cs b/OpenSim/Framework/General/ClientManager.cs index 5b6e7b3dd2..03ad22610d 100644 --- a/OpenSim/Framework/General/ClientManager.cs +++ b/OpenSim/Framework/General/ClientManager.cs @@ -8,11 +8,11 @@ namespace OpenSim.Framework public delegate void ForEachClientDelegate( IClientAPI client ); public class ClientManager { - private Dictionary m_clientThreads; + private Dictionary m_clients; public void ForEachClient(ForEachClientDelegate whatToDo) { - foreach (IClientAPI client in m_clientThreads.Values) + foreach (IClientAPI client in m_clients.Values) { whatToDo(client); } @@ -20,12 +20,12 @@ namespace OpenSim.Framework public ClientManager() { - m_clientThreads = new Dictionary(); + m_clients = new Dictionary(); } public void Add(uint id, IClientAPI client ) { - m_clientThreads.Add( id, client ); + m_clients.Add( id, client ); } } } diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index c5c9efcf34..949c3696a9 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -217,7 +217,7 @@ namespace OpenSim m_udpServer.Add(udpServer); this.regionData.Add(regionDat); - LocalWorld = new Scene(udpServer.PacketServer.ClientAPIs, regionDat, authenBase, commsManager, this.AssetCache, httpServer); + LocalWorld = new Scene(udpServer.PacketServer.ClientManager, regionDat, authenBase, commsManager, this.AssetCache, httpServer); this.m_localWorld.Add(LocalWorld); //LocalWorld.InventoryCache = InventoryCache; //LocalWorld.AssetCache = AssetCache; diff --git a/OpenSim/Region/ClientStack/PacketServer.cs b/OpenSim/Region/ClientStack/PacketServer.cs index 5e62450841..c7ca3155eb 100644 --- a/OpenSim/Region/ClientStack/PacketServer.cs +++ b/OpenSim/Region/ClientStack/PacketServer.cs @@ -41,7 +41,11 @@ namespace OpenSim.Region.ClientStack private ClientStackNetworkHandler _networkHandler; private IWorld _localWorld; public Dictionary ClientThreads = new Dictionary(); - public ClientManager ClientAPIs = new ClientManager(); + private ClientManager m_clientManager = new ClientManager(); + public ClientManager ClientManager + { + get { return m_clientManager; } + } public PacketServer(ClientStackNetworkHandler networkHandler) { @@ -150,7 +154,7 @@ namespace OpenSim.Region.ClientStack authenticateSessionsClass); this.ClientThreads.Add(useCircuit.CircuitCode.Code, newuser); - this.ClientAPIs.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); + this.m_clientManager.Add(useCircuit.CircuitCode.Code, (IClientAPI)newuser); return true; } diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index bb19996233..e64e147f45 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Scenes // Console.WriteLine("Chat message"); ScenePresence avatar = null; - m_clientThreads.ForEachClient(delegate(IClientAPI client) + m_clientManager.ForEachClient(delegate(IClientAPI client) { int dis = -1000; if (this.Avatars.ContainsKey(client.AgentId)) diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 043dcd7590..81c56c4c32 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -98,13 +98,13 @@ namespace OpenSim.Region.Environment.Scenes /// Dictionary to contain client threads /// Region Handle for this region /// Region Name for this region - public Scene(ClientManager clientThreads, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) + public Scene(ClientManager clientManager, RegionInfo regInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) { updateLock = new Mutex(false); this.authenticateHandler = authen; this.commsManager = commsMan; this.assetCache = assetCach; - m_clientThreads = clientThreads; + m_clientManager = clientManager; m_regInfo = regInfo; m_regionHandle = m_regInfo.RegionHandle; m_regionName = m_regInfo.RegionName; @@ -229,7 +229,7 @@ namespace OpenSim.Region.Environment.Scenes } this.localStorage.SaveMap(this.Terrain.getHeights1D()); - m_clientThreads.ForEachClient(delegate(IClientAPI client) + m_clientManager.ForEachClient(delegate(IClientAPI client) { this.SendLayerData(client); }); @@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Scenes } this.localStorage.SaveMap(this.Terrain.getHeights1D()); - m_clientThreads.ForEachClient(delegate(IClientAPI client) + m_clientManager.ForEachClient(delegate(IClientAPI client) { this.SendLayerData(client); }); @@ -290,7 +290,7 @@ namespace OpenSim.Region.Environment.Scenes { /* Dont save here, rely on tainting system instead */ - m_clientThreads.ForEachClient(delegate(IClientAPI client) + m_clientManager.ForEachClient(delegate(IClientAPI client) { this.SendLayerData(pointx, pointy, client); }); diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 44121b4fc5..811f54c52a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes public abstract class SceneBase : IWorld { public Dictionary Entities; - protected ClientManager m_clientThreads; + protected ClientManager m_clientManager; protected ulong m_regionHandle; protected string m_regionName; protected RegionInfo m_regInfo; diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs index b82529aa23..3c694201eb 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs @@ -15,8 +15,8 @@ namespace SimpleApp { private List m_avatars; - public MyWorld(ClientManager clientThreads, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) - : base(clientThreads, regionInfo, authen, commsMan, assetCach, httpServer) + public MyWorld(ClientManager clientManager, RegionInfo regionInfo, AuthenticateSessionsBase authen, CommunicationsManager commsMan, AssetCache assetCach, BaseHttpServer httpServer) + : base(clientManager, regionInfo, authen, commsMan, assetCach, httpServer) { m_avatars = new List(); } diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 4567d7e9e6..5cfc7692c7 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -54,7 +54,7 @@ namespace SimpleApp RegionInfo regionInfo = new RegionInfo( 1000, 1000, internalEndPoint, "127.0.0.1" ); BaseHttpServer httpServer = new BaseHttpServer( internalEndPoint.Port ); - MyWorld world = new MyWorld(packetServer.ClientAPIs, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); + MyWorld world = new MyWorld(packetServer.ClientManager, regionInfo, m_circuitManager, communicationsManager, assetCache, httpServer); world.PhysScene = PhysicsScene.Null; udpServer.LocalWorld = world;