aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index f22e084..07b29bd 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -194,13 +194,13 @@ namespace OpenSim.Grid.UserServer
194 { 194 {
195 start_x = Convert.ToInt32(startLocationRequestParsed[1]); 195 start_x = Convert.ToInt32(startLocationRequestParsed[1]);
196 start_y = Convert.ToInt32(startLocationRequestParsed[2]); 196 start_y = Convert.ToInt32(startLocationRequestParsed[2]);
197 start_z = Convert.ToInt32(startLocationRequestParsed[3]); 197 start_z = Convert.ToInt32(startLocationRequestParsed[3]);
198 198
199 if (start_x >= 0 && start_y >= 0 && start_z >= 0) 199 if (start_x >= 0 && start_y >= 0 && start_z >= 0)
200 { 200 {
201 Vector3 tmp_v = new Vector3(start_x, start_y, start_z); 201 Vector3 tmp_v = new Vector3(start_x, start_y, start_z);
202 theUser.CurrentAgent.Position = tmp_v; 202 theUser.CurrentAgent.Position = tmp_v;
203 } 203 }
204 } 204 }
205 } 205 }
206 } 206 }
@@ -242,7 +242,7 @@ namespace OpenSim.Grid.UserServer
242 // Load information from the gridserver 242 // Load information from the gridserver
243 ulong defaultHandle = (((ulong) m_config.DefaultX * Constants.RegionSize) << 32) | 243 ulong defaultHandle = (((ulong) m_config.DefaultX * Constants.RegionSize) << 32) |
244 ((ulong) m_config.DefaultY * Constants.RegionSize); 244 ((ulong) m_config.DefaultY * Constants.RegionSize);
245 245
246 if (defaultHandle == SimInfo.regionHandle) 246 if (defaultHandle == SimInfo.regionHandle)
247 { 247 {
248 m_log.ErrorFormat("[LOGIN]: Not trying the default region since this is the same as the selected region"); 248 m_log.ErrorFormat("[LOGIN]: Not trying the default region since this is the same as the selected region");
@@ -250,7 +250,7 @@ namespace OpenSim.Grid.UserServer
250 } 250 }
251 251
252 m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead"); 252 m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead");
253 253
254 SimInfo = RegionProfileData.RequestSimProfileData(defaultHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); 254 SimInfo = RegionProfileData.RequestSimProfileData(defaultHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
255 255
256 // Customise the response 256 // Customise the response
@@ -260,18 +260,18 @@ namespace OpenSim.Grid.UserServer
260 (SimInfo.regionLocX * Constants.RegionSize), 260 (SimInfo.regionLocX * Constants.RegionSize),
261 (SimInfo.regionLocY*Constants.RegionSize), 261 (SimInfo.regionLocY*Constants.RegionSize),
262 theUser.HomeLocation.X, theUser.HomeLocation.Y, theUser.HomeLocation.Z, 262 theUser.HomeLocation.X, theUser.HomeLocation.Y, theUser.HomeLocation.Z,
263 theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z); 263 theUser.HomeLookAt.X, theUser.HomeLookAt.Y, theUser.HomeLookAt.Z);
264 264
265 if (!PrepareLoginToRegion(SimInfo, theUser, response)) 265 if (!PrepareLoginToRegion(SimInfo, theUser, response))
266 { 266 {
267 response.CreateDeadRegionResponse(); 267 response.CreateDeadRegionResponse();
268 return false; 268 return false;
269 } 269 }
270 } 270 }
271 271
272 return true; 272 return true;
273 } 273 }
274 274
275 /// <summary> 275 /// <summary>
276 /// Prepare a login to the given region. This involves both telling the region to expect a connection 276 /// Prepare a login to the given region. This involves both telling the region to expect a connection
277 /// and appropriately customising the response to the user. 277 /// and appropriately customising the response to the user.
@@ -283,7 +283,7 @@ namespace OpenSim.Grid.UserServer
283 private bool PrepareLoginToRegion(RegionProfileData sim, UserProfileData user, LoginResponse response) 283 private bool PrepareLoginToRegion(RegionProfileData sim, UserProfileData user, LoginResponse response)
284 { 284 {
285 try 285 try
286 { 286 {
287 response.SimAddress = Util.GetHostFromURL(sim.serverURI).ToString(); 287 response.SimAddress = Util.GetHostFromURL(sim.serverURI).ToString();
288 response.SimPort = uint.Parse(sim.serverURI.Split(new char[] {'/', ':'})[4]); 288 response.SimPort = uint.Parse(sim.serverURI.Split(new char[] {'/', ':'})[4]);
289 response.RegionX = sim.regionLocX; 289 response.RegionX = sim.regionLocX;
@@ -300,7 +300,7 @@ namespace OpenSim.Grid.UserServer
300 300
301 // Update agent with target sim 301 // Update agent with target sim
302 user.CurrentAgent.Region = sim.UUID; 302 user.CurrentAgent.Region = sim.UUID;
303 user.CurrentAgent.Handle = sim.regionHandle; 303 user.CurrentAgent.Handle = sim.regionHandle;
304 304
305 // Prepare notification 305 // Prepare notification
306 Hashtable SimParams = new Hashtable(); 306 Hashtable SimParams = new Hashtable();
@@ -317,7 +317,7 @@ namespace OpenSim.Grid.UserServer
317 SimParams["caps_path"] = capsPath; 317 SimParams["caps_path"] = capsPath;
318 ArrayList SendParams = new ArrayList(); 318 ArrayList SendParams = new ArrayList();
319 SendParams.Add(SimParams); 319 SendParams.Add(SimParams);
320 320
321 // Send 321 // Send
322 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); 322 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
323 XmlRpcResponse GridResp = GridReq.Send(sim.httpServerURI, 30000); 323 XmlRpcResponse GridResp = GridReq.Send(sim.httpServerURI, 30000);
@@ -363,13 +363,13 @@ namespace OpenSim.Grid.UserServer
363 m_log.ErrorFormat("[LOGIN]: XmlRpc request to region failed with message {0}, code {1} ", GridResp.FaultString, GridResp.FaultCode); 363 m_log.ErrorFormat("[LOGIN]: XmlRpc request to region failed with message {0}, code {1} ", GridResp.FaultString, GridResp.FaultCode);
364 return false; 364 return false;
365 } 365 }
366 } 366 }
367 catch (Exception e) 367 catch (Exception e)
368 { 368 {
369 m_log.ErrorFormat("[LOGIN]: Region not available for login, {0}", e); 369 m_log.ErrorFormat("[LOGIN]: Region not available for login, {0}", e);
370 return false; 370 return false;
371 } 371 }
372 372
373 return true; 373 return true;
374 } 374 }
375 375