From 564a97b508fd23601cd41075aa6a1f7de0800b41 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 31 May 2007 15:31:31 +0000 Subject: Implementing a test Communications manager to test some of the interfaces (likely this test version will morph into the sandbox version) --- .../TestLocalCommsManager.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Common/OpenGrid.Framework.Communications') diff --git a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs index 57049fc..b4fe696 100644 --- a/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs +++ b/Common/OpenGrid.Framework.Communications/TestLocalCommsManager.cs @@ -11,8 +11,8 @@ namespace OpenGrid.Framework.Communications { public class TestLocalCommsManager : RegionServerCommsManager { - protected Dictionary regions = new Dictionary(); - protected Dictionary regionHosts = new Dictionary(); + protected Dictionary regions = new Dictionary(); + protected Dictionary regionHosts = new Dictionary(); public TestLocalCommsManager() { @@ -28,9 +28,9 @@ namespace OpenGrid.Framework.Communications { if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) { - this.regions.Add((uint)regionInfo.RegionHandle, regionInfo); + this.regions.Add(regionInfo.RegionHandle, regionInfo); RegionCommsHostBase regionHost = new RegionCommsHostBase(); - this.regionHosts.Add((uint)regionInfo.RegionHandle, regionHost); + this.regionHosts.Add(regionInfo.RegionHandle, regionHost); return regionHost; } @@ -59,13 +59,14 @@ namespace OpenGrid.Framework.Communications } /// - /// + /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session /// /// /// /// - public bool AddNewSession(uint regionHandle, Login loginData) + public bool AddNewSession(ulong regionHandle, Login loginData) { + Console.WriteLine(" comms manager been told to expect new user"); AgentCircuitData agent = new AgentCircuitData(); agent.AgentID = loginData.Agent; agent.firstname = loginData.First; @@ -77,9 +78,9 @@ namespace OpenGrid.Framework.Communications agent.InventoryFolder = loginData.InventoryFolder; agent.startpos = new LLVector3(128, 128, 70); - if (this.regionHosts.ContainsKey((uint)regionHandle)) + if (this.regionHosts.ContainsKey(regionHandle)) { - this.regionHosts[(uint)regionHandle].TriggerExpectUser(agent); + this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent); return true; } -- cgit v1.1