diff options
Diffstat (limited to '')
6 files changed, 50 insertions, 24 deletions
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 | |||
109 | 109 | ||
110 | public void RegionLoaded(Scene scene) | 110 | public void RegionLoaded(Scene scene) |
111 | { | 111 | { |
112 | if (!m_Enabled) | ||
113 | return; | ||
114 | |||
112 | if (!m_Registered) | 115 | if (!m_Registered) |
113 | { | 116 | { |
114 | m_Registered = true; | 117 | 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 | |||
91 | if (!m_Enabled) | 91 | if (!m_Enabled) |
92 | return; | 92 | return; |
93 | 93 | ||
94 | } | ||
95 | |||
96 | public void RemoveRegion(Scene scene) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | public void RegionLoaded(Scene scene) | ||
101 | { | ||
102 | if (!m_Enabled) | ||
103 | return; | ||
104 | |||
94 | if (!m_Registered) | 105 | if (!m_Registered) |
95 | { | 106 | { |
96 | m_Registered = true; | 107 | m_Registered = true; |
@@ -103,14 +114,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation | |||
103 | } | 114 | } |
104 | } | 115 | } |
105 | 116 | ||
106 | public void RemoveRegion(Scene scene) | ||
107 | { | ||
108 | } | ||
109 | |||
110 | public void RegionLoaded(Scene scene) | ||
111 | { | ||
112 | } | ||
113 | |||
114 | #endregion | 117 | #endregion |
115 | 118 | ||
116 | } | 119 | } |
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 | |||
103 | 103 | ||
104 | public void AddRegion(Scene scene) | 104 | public void AddRegion(Scene scene) |
105 | { | 105 | { |
106 | if (!m_enabled) | ||
107 | return; | ||
108 | |||
109 | if (!initialized) | ||
110 | { | ||
111 | InitOnce(scene); | ||
112 | initialized = true; | ||
113 | } | ||
114 | InitEach(scene); | ||
106 | } | 115 | } |
107 | 116 | ||
108 | public void RemoveRegion(Scene scene) | 117 | public void RemoveRegion(Scene scene) |
@@ -116,15 +125,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
116 | 125 | ||
117 | public void RegionLoaded(Scene scene) | 126 | public void RegionLoaded(Scene scene) |
118 | { | 127 | { |
119 | if (m_enabled) | 128 | if (!m_enabled) |
120 | { | 129 | return; |
121 | if (!initialized) | 130 | |
122 | { | 131 | m_hyperlinkService = m_aScene.RequestModuleInterface<IHyperlinkService>(); |
123 | InitOnce(scene); | 132 | |
124 | initialized = true; | ||
125 | } | ||
126 | InitEach(scene); | ||
127 | } | ||
128 | } | 133 | } |
129 | 134 | ||
130 | public Type ReplaceableInterface | 135 | public Type ReplaceableInterface |
@@ -148,7 +153,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
148 | m_localBackend = new LocalSimulationConnectorModule(); | 153 | m_localBackend = new LocalSimulationConnectorModule(); |
149 | m_commsManager = scene.CommsManager; | 154 | m_commsManager = scene.CommsManager; |
150 | m_aScene = scene; | 155 | m_aScene = scene; |
151 | m_hyperlinkService = m_aScene.RequestModuleInterface<IHyperlinkService>(); | ||
152 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); | 156 | //m_regionClient = new RegionToRegionClient(m_aScene, m_hyperlinkService); |
153 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); | 157 | m_thisIP = Util.GetHostFromDNS(scene.RegionInfo.ExternalHostName); |
154 | } | 158 | } |
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 | |||
134 | uint teleportFlags = 0; | 134 | uint teleportFlags = 0; |
135 | if (args.ContainsKey("destination_x") && args["destination_x"] != null) | 135 | if (args.ContainsKey("destination_x") && args["destination_x"] != null) |
136 | Int32.TryParse(args["destination_x"].AsString(), out x); | 136 | Int32.TryParse(args["destination_x"].AsString(), out x); |
137 | else | ||
138 | m_log.WarnFormat(" -- request didn't have destination_x"); | ||
137 | if (args.ContainsKey("destination_y") && args["destination_y"] != null) | 139 | if (args.ContainsKey("destination_y") && args["destination_y"] != null) |
138 | Int32.TryParse(args["destination_y"].AsString(), out y); | 140 | Int32.TryParse(args["destination_y"].AsString(), out y); |
141 | else | ||
142 | m_log.WarnFormat(" -- request didn't have destination_y"); | ||
139 | if (args.ContainsKey("destination_uuid") && args["destination_uuid"] != null) | 143 | if (args.ContainsKey("destination_uuid") && args["destination_uuid"] != null) |
140 | UUID.TryParse(args["destination_uuid"].AsString(), out uuid); | 144 | UUID.TryParse(args["destination_uuid"].AsString(), out uuid); |
141 | if (args.ContainsKey("destination_name") && args["destination_name"] != null) | 145 | 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; | |||
39 | using OpenMetaverse; | 39 | using OpenMetaverse; |
40 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
41 | using log4net; | 41 | using log4net; |
42 | using Nini.Config; | ||
42 | 43 | ||
43 | namespace OpenSim.Services.Connectors.Simulation | 44 | namespace OpenSim.Services.Connectors.Simulation |
44 | { | 45 | { |
@@ -52,7 +53,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
52 | { | 53 | { |
53 | } | 54 | } |
54 | 55 | ||
55 | public SimulationServiceConnector(GridRegion region) | 56 | public SimulationServiceConnector(IConfigSource config) |
56 | { | 57 | { |
57 | //m_Region = region; | 58 | //m_Region = region; |
58 | } | 59 | } |
@@ -68,6 +69,13 @@ namespace OpenSim.Services.Connectors.Simulation | |||
68 | { | 69 | { |
69 | reason = String.Empty; | 70 | reason = String.Empty; |
70 | 71 | ||
72 | if (destination == null) | ||
73 | { | ||
74 | reason = "Destination is null"; | ||
75 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Given destination is null"); | ||
76 | return false; | ||
77 | } | ||
78 | |||
71 | // Eventually, we want to use a caps url instead of the agentID | 79 | // Eventually, we want to use a caps url instead of the agentID |
72 | string uri = string.Empty; | 80 | string uri = string.Empty; |
73 | try | 81 | try |
@@ -128,7 +136,8 @@ namespace OpenSim.Services.Connectors.Simulation | |||
128 | AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send | 136 | AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send |
129 | os = AgentCreateRequest.GetRequestStream(); | 137 | os = AgentCreateRequest.GetRequestStream(); |
130 | os.Write(buffer, 0, strBuffer.Length); //Send it | 138 | os.Write(buffer, 0, strBuffer.Length); //Send it |
131 | //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateChildAgent request to remote sim {0}", uri); | 139 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}", |
140 | uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY); | ||
132 | } | 141 | } |
133 | //catch (WebException ex) | 142 | //catch (WebException ex) |
134 | catch | 143 | 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 | |||
26 | private IGridService m_GridService; | 26 | private IGridService m_GridService; |
27 | private IPresenceService m_PresenceService; | 27 | private IPresenceService m_PresenceService; |
28 | private ISimulationService m_LocalSimulationService; | 28 | private ISimulationService m_LocalSimulationService; |
29 | private ISimulationService m_RemoteSimulationService; | ||
29 | private ILibraryService m_LibraryService; | 30 | private ILibraryService m_LibraryService; |
30 | private IAvatarService m_AvatarService; | 31 | private IAvatarService m_AvatarService; |
31 | 32 | ||
32 | private string m_DefaultRegionName; | 33 | private string m_DefaultRegionName; |
33 | private string m_RemoteSimulationDll; | ||
34 | private string m_WelcomeMessage; | 34 | private string m_WelcomeMessage; |
35 | private bool m_RequireInventory; | 35 | private bool m_RequireInventory; |
36 | 36 | ||
@@ -47,9 +47,9 @@ namespace OpenSim.Services.LLLoginService | |||
47 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); | 47 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); |
48 | string libService = serverConfig.GetString("LibraryService", String.Empty); | 48 | string libService = serverConfig.GetString("LibraryService", String.Empty); |
49 | string avatarService = serverConfig.GetString("AvatarService", String.Empty); | 49 | string avatarService = serverConfig.GetString("AvatarService", String.Empty); |
50 | string simulationService = serverConfig.GetString("SimulationService", String.Empty); | ||
50 | 51 | ||
51 | m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); | 52 | m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); |
52 | m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty); | ||
53 | m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); | 53 | m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); |
54 | m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); | 54 | m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); |
55 | 55 | ||
@@ -67,6 +67,8 @@ namespace OpenSim.Services.LLLoginService | |||
67 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); | 67 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); |
68 | if (avatarService != string.Empty) | 68 | if (avatarService != string.Empty) |
69 | m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); | 69 | m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarService, args); |
70 | if (simulationService != string.Empty) | ||
71 | m_RemoteSimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); | ||
70 | // | 72 | // |
71 | // deal with the services given as argument | 73 | // deal with the services given as argument |
72 | // | 74 | // |
@@ -184,8 +186,8 @@ namespace OpenSim.Services.LLLoginService | |||
184 | // independent login servers have just a remoteSimulationDll | 186 | // independent login servers have just a remoteSimulationDll |
185 | if (!startLocation.Contains("@") && (m_LocalSimulationService != null)) | 187 | if (!startLocation.Contains("@") && (m_LocalSimulationService != null)) |
186 | simConnector = m_LocalSimulationService; | 188 | simConnector = m_LocalSimulationService; |
187 | else if (m_RemoteSimulationDll != string.Empty) | 189 | else if (m_RemoteSimulationService != null) |
188 | simConnector = ServerUtils.LoadPlugin<ISimulationService>(m_RemoteSimulationDll, args); | 190 | simConnector = m_RemoteSimulationService; |
189 | if (simConnector != null) | 191 | if (simConnector != null) |
190 | { | 192 | { |
191 | circuitCode = (uint)Util.RandomClass.Next(); ; | 193 | circuitCode = (uint)Util.RandomClass.Next(); ; |
@@ -362,6 +364,7 @@ namespace OpenSim.Services.LLLoginService | |||
362 | //aCircuit.BaseFolder = irrelevant | 364 | //aCircuit.BaseFolder = irrelevant |
363 | aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); | 365 | aCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); |
364 | aCircuit.child = false; // the first login agent is root | 366 | aCircuit.child = false; // the first login agent is root |
367 | aCircuit.ChildrenCapSeeds = new Dictionary<ulong, string>(); | ||
365 | aCircuit.circuitcode = circuit; | 368 | aCircuit.circuitcode = circuit; |
366 | aCircuit.firstname = account.FirstName; | 369 | aCircuit.firstname = account.FirstName; |
367 | //aCircuit.InventoryFolder = irrelevant | 370 | //aCircuit.InventoryFolder = irrelevant |