From 99efa99585639c94fdb484681663ac7b6f03538e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 3 Jan 2010 11:44:57 -0800 Subject: Successfully logged into a grid. --- .../Login/LLLoginServiceInConnectorModule.cs | 3 +++ .../SimulationServiceInConnectorModule.cs | 19 +++++++++-------- .../Simulation/RemoteSimulationConnector.cs | 24 +++++++++++++--------- .../Server/Handlers/Simulation/AgentHandlers.cs | 4 ++++ .../Simulation/SimulationServiceConnector.cs | 13 ++++++++++-- OpenSim/Services/LLLoginService/LLLoginService.cs | 11 ++++++---- 6 files changed, 50 insertions(+), 24 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs index ecb6c91..2a9366c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Login/LLLoginServiceInConnectorModule.cs @@ -109,6 +109,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Login public void RegionLoaded(Scene scene) { + if (!m_Enabled) + return; + if (!m_Registered) { m_Registered = true; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs index 03a5124..5ee1c97 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs @@ -91,6 +91,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation if (!m_Enabled) return; + } + + public void RemoveRegion(Scene scene) + { + } + + public void RegionLoaded(Scene scene) + { + if (!m_Enabled) + return; + if (!m_Registered) { m_Registered = true; @@ -103,14 +114,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation } } - public void RemoveRegion(Scene scene) - { - } - - public void RegionLoaded(Scene scene) - { - } - #endregion } diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index b7dc283..c9cc368 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs @@ -103,6 +103,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation public void AddRegion(Scene scene) { + if (!m_enabled) + return; + + if (!initialized) + { + InitOnce(scene); + initialized = true; + } + InitEach(scene); } public void RemoveRegion(Scene scene) @@ -116,15 +125,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation public void RegionLoaded(Scene scene) { - if (m_enabled) - { - if (!initialized) - { - InitOnce(scene); - initialized = true; - } - InitEach(scene); - } + if (!m_enabled) + return; + + m_hyperlinkService = m_aScene.RequestModuleInterface(); + } public Type ReplaceableInterface @@ -148,7 +153,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation m_localBackend = new LocalSimulationConnectorModule(); m_commsManager = scene.CommsManager; m_aScene = scene; - m_hyperlinkService = m_aScene.RequestModuleInterface(); //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); } diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index f4f3eea..ccb4c70 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs @@ -134,8 +134,12 @@ namespace OpenSim.Server.Handlers.Simulation uint teleportFlags = 0; if (args.ContainsKey("destination_x") && args["destination_x"] != null) Int32.TryParse(args["destination_x"].AsString(), out x); + else + m_log.WarnFormat(" -- request didn't have destination_x"); if (args.ContainsKey("destination_y") && args["destination_y"] != null) Int32.TryParse(args["destination_y"].AsString(), out y); + else + m_log.WarnFormat(" -- request didn't have destination_y"); if (args.ContainsKey("destination_uuid") && args["destination_uuid"] != null) UUID.TryParse(args["destination_uuid"].AsString(), out uuid); if (args.ContainsKey("destination_name") && args["destination_name"] != null) diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index fcf07c7..dc532d0 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -39,6 +39,7 @@ using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; using OpenMetaverse.StructuredData; using log4net; +using Nini.Config; namespace OpenSim.Services.Connectors.Simulation { @@ -52,7 +53,7 @@ namespace OpenSim.Services.Connectors.Simulation { } - public SimulationServiceConnector(GridRegion region) + public SimulationServiceConnector(IConfigSource config) { //m_Region = region; } @@ -68,6 +69,13 @@ namespace OpenSim.Services.Connectors.Simulation { reason = String.Empty; + if (destination == null) + { + reason = "Destination is null"; + m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); + return false; + } + // Eventually, we want to use a caps url instead of the agentID string uri = string.Empty; try @@ -128,7 +136,8 @@ namespace OpenSim.Services.Connectors.Simulation AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send os = AgentCreateRequest.GetRequestStream(); os.Write(buffer, 0, strBuffer.Length); //Send it - //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateChildAgent request to remote sim {0}", uri); + m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}", + uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY); } //catch (WebException ex) catch diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 638fa9f..2ae552f 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -26,11 +26,11 @@ namespace OpenSim.Services.LLLoginService private IGridService m_GridService; private IPresenceService m_PresenceService; private ISimulationService m_LocalSimulationService; + private ISimulationService m_RemoteSimulationService; private ILibraryService m_LibraryService; private IAvatarService m_AvatarService; private string m_DefaultRegionName; - private string m_RemoteSimulationDll; private string m_WelcomeMessage; private bool m_RequireInventory; @@ -47,9 +47,9 @@ namespace OpenSim.Services.LLLoginService string presenceService = serverConfig.GetString("PresenceService", String.Empty); string libService = serverConfig.GetString("LibraryService", String.Empty); string avatarService = serverConfig.GetString("AvatarService", String.Empty); + string simulationService = serverConfig.GetString("SimulationService", String.Empty); m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); - m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty); m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); @@ -67,6 +67,8 @@ namespace OpenSim.Services.LLLoginService m_PresenceService = ServerUtils.LoadPlugin(presenceService, args); if (avatarService != string.Empty) m_AvatarService = ServerUtils.LoadPlugin(avatarService, args); + if (simulationService != string.Empty) + m_RemoteSimulationService = ServerUtils.LoadPlugin(simulationService, args); // // deal with the services given as argument // @@ -184,8 +186,8 @@ namespace OpenSim.Services.LLLoginService // independent login servers have just a remoteSimulationDll if (!startLocation.Contains("@") && (m_LocalSimulationService != null)) simConnector = m_LocalSimulationService; - else if (m_RemoteSimulationDll != string.Empty) - simConnector = ServerUtils.LoadPlugin(m_RemoteSimulationDll, args); + else if (m_RemoteSimulationService != null) + simConnector = m_RemoteSimulationService; if (simConnector != null) { circuitCode = (uint)Util.RandomClass.Next(); ; @@ -362,6 +364,7 @@ namespace OpenSim.Services.LLLoginService //aCircuit.BaseFolder = irrelevant aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); aCircuit.child = false; // the first login agent is root + aCircuit.ChildrenCapSeeds = new Dictionary(); aCircuit.circuitcode = circuit; aCircuit.firstname = account.FirstName; //aCircuit.InventoryFolder = irrelevant -- cgit v1.1