aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/HypergridService/GatekeeperService.cs27
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs23
2 files changed, 35 insertions, 15 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs
index 3fc9327..3aaafe8 100644
--- a/OpenSim/Services/HypergridService/GatekeeperService.cs
+++ b/OpenSim/Services/HypergridService/GatekeeperService.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Services.HypergridService
73 throw new Exception(String.Format("No section GatekeeperService in config file")); 73 throw new Exception(String.Format("No section GatekeeperService in config file"));
74 74
75 string accountService = serverConfig.GetString("UserAccountService", String.Empty); 75 string accountService = serverConfig.GetString("UserAccountService", String.Empty);
76 string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); 76 string homeUsersService = serverConfig.GetString("UserAgentService", string.Empty);
77 string gridService = serverConfig.GetString("GridService", String.Empty); 77 string gridService = serverConfig.GetString("GridService", String.Empty);
78 string presenceService = serverConfig.GetString("PresenceService", String.Empty); 78 string presenceService = serverConfig.GetString("PresenceService", String.Empty);
79 string simulationService = serverConfig.GetString("SimulationService", String.Empty); 79 string simulationService = serverConfig.GetString("SimulationService", String.Empty);
@@ -283,18 +283,23 @@ namespace OpenSim.Services.HypergridService
283 return false; 283 return false;
284 } 284 }
285 285
286 Object[] args = new Object[] { userURL }; 286 if (userURL == m_ExternalName)
287 IUserAgentService userAgentService = new UserAgentServiceConnector(userURL); //ServerUtils.LoadPlugin<IUserAgentService>(m_AuthDll, args); 287 return m_UserAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID);
288 if (userAgentService != null) 288 else
289 { 289 {
290 try 290 Object[] args = new Object[] { userURL };
291 IUserAgentService userAgentService = new UserAgentServiceConnector(userURL);
292 if (userAgentService != null)
291 { 293 {
292 return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID); 294 try
293 } 295 {
294 catch 296 return userAgentService.VerifyAgent(aCircuit.SessionID, aCircuit.ServiceSessionID);
295 { 297 }
296 m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL); 298 catch
297 return false; 299 {
300 m_log.DebugFormat("[GATEKEEPER SERVICE]: Unable to contact authentication service at {0}", userURL);
301 return false;
302 }
298 } 303 }
299 } 304 }
300 305
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 4bee4b5..181d7f2 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -61,9 +61,11 @@ namespace OpenSim.Services.HypergridService
61 61
62 protected static IGridUserService m_GridUserService; 62 protected static IGridUserService m_GridUserService;
63 protected static IGridService m_GridService; 63 protected static IGridService m_GridService;
64 //protected static GatekeeperServiceConnector m_GatekeeperConnector; 64 protected static GatekeeperServiceConnector m_GatekeeperConnector;
65 protected static IGatekeeperService m_GatekeeperService; 65 protected static IGatekeeperService m_GatekeeperService;
66 66
67 protected static string m_GridName;
68
67 protected static bool m_BypassClientVerification; 69 protected static bool m_BypassClientVerification;
68 70
69 public UserAgentService(IConfigSource config) 71 public UserAgentService(IConfigSource config)
@@ -90,8 +92,15 @@ namespace OpenSim.Services.HypergridService
90 Object[] args = new Object[] { config }; 92 Object[] args = new Object[] { config };
91 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 93 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
92 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); 94 m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args);
93 //m_GatekeeperConnector = new GatekeeperServiceConnector(); 95 m_GatekeeperConnector = new GatekeeperServiceConnector();
94 m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(gatekeeperService, args); 96 m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(gatekeeperService, args);
97
98 m_GridName = serverConfig.GetString("ExternalName", string.Empty);
99 if (m_GridName == string.Empty)
100 {
101 serverConfig = config.Configs["GatekeeperService"];
102 m_GridName = serverConfig.GetString("ExternalName", string.Empty);
103 }
95 } 104 }
96 } 105 }
97 106
@@ -139,7 +148,12 @@ namespace OpenSim.Services.HypergridService
139 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); 148 TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region);
140 149
141 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); 150 //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
142 bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); 151 bool success = false;
152 string gridName = "http://" + gatekeeper.ExternalHostName + ":" + gatekeeper.HttpPort;
153 if (m_GridName == gridName)
154 success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason);
155 else
156 success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason);
143 157
144 if (!success) 158 if (!success)
145 { 159 {
@@ -179,7 +193,7 @@ namespace OpenSim.Services.HypergridService
179 m_TravelingAgents[agentCircuit.SessionID] = travel; 193 m_TravelingAgents[agentCircuit.SessionID] = travel;
180 } 194 }
181 travel.UserID = agentCircuit.AgentID; 195 travel.UserID = agentCircuit.AgentID;
182 travel.GridExternalName = region.ExternalHostName + ":" + region.HttpPort; 196 travel.GridExternalName = "http://" + region.ExternalHostName + ":" + region.HttpPort;
183 travel.ServiceToken = agentCircuit.ServiceSessionID; 197 travel.ServiceToken = agentCircuit.ServiceSessionID;
184 if (old != null) 198 if (old != null)
185 travel.ClientToken = old.ClientToken; 199 travel.ClientToken = old.ClientToken;
@@ -215,6 +229,7 @@ namespace OpenSim.Services.HypergridService
215 return false; 229 return false;
216 230
217 TravelingAgentInfo travel = m_TravelingAgents[sessionID]; 231 TravelingAgentInfo travel = m_TravelingAgents[sessionID];
232
218 return travel.GridExternalName == thisGridExternalName; 233 return travel.GridExternalName == thisGridExternalName;
219 } 234 }
220 235