aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/GridServer/GridManager.cs47
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs5
2 files changed, 30 insertions, 22 deletions
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 7eb9c34..14a813a 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -249,7 +249,7 @@ namespace OpenSim.Grid.GridServer
249 /// <param name="sim"></param> 249 /// <param name="sim"></param>
250 /// <returns></returns> 250 /// <returns></returns>
251 protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim) 251 protected virtual bool ValidateOverwrite(RegionProfileData sim, RegionProfileData existingSim)
252 { 252 {
253 return (existingSim.regionRecvKey == sim.regionRecvKey && 253 return (existingSim.regionRecvKey == sim.regionRecvKey &&
254 existingSim.regionSendKey == sim.regionSendKey); 254 existingSim.regionSendKey == sim.regionSendKey);
255 } 255 }
@@ -263,7 +263,7 @@ namespace OpenSim.Grid.GridServer
263 /// <param name="sim"></param> 263 /// <param name="sim"></param>
264 /// <returns></returns> 264 /// <returns></returns>
265 protected virtual bool ValidateNewRegion(RegionProfileData sim) 265 protected virtual bool ValidateNewRegion(RegionProfileData sim)
266 { 266 {
267 return (sim.regionRecvKey == Config.SimSendKey && 267 return (sim.regionRecvKey == Config.SimSendKey &&
268 sim.regionSendKey == Config.SimRecvKey); 268 sim.regionSendKey == Config.SimRecvKey);
269 } 269 }
@@ -292,7 +292,7 @@ namespace OpenSim.Grid.GridServer
292 292
293 if (!requestData.ContainsKey("UUID") || !LLUUID.TryParse((string)requestData["UUID"], out uuid)) 293 if (!requestData.ContainsKey("UUID") || !LLUUID.TryParse((string)requestData["UUID"], out uuid))
294 { 294 {
295 m_log.Info("[GRID]: Region connected without a UUID, ignoring."); 295 m_log.Warn("[LOGIN PRELUDE]: Region connected without a UUID, sending back error response.");
296 return ErrorResponse("No UUID passed to grid server - unable to connect you"); 296 return ErrorResponse("No UUID passed to grid server - unable to connect you");
297 } 297 }
298 298
@@ -302,9 +302,11 @@ namespace OpenSim.Grid.GridServer
302 } 302 }
303 catch (FormatException e) 303 catch (FormatException e)
304 { 304 {
305 m_log.Info("[GRID]: Invalid login parameters, ignoring."); 305 m_log.Warn("[LOGIN PRELUDE]: Invalid login parameters, sending back error response.");
306 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString() ); 306 return ErrorResponse("Wrong format in login parameters. Please verify parameters." + e.ToString() );
307 } 307 }
308
309 m_log.InfoFormat("[LOGIN BEGIN]: Received login request from simulator: {0}", sim.regionName);
308 310
309 existingSim = GetRegion(sim.regionHandle); 311 existingSim = GetRegion(sim.regionHandle);
310 312
@@ -341,27 +343,27 @@ namespace OpenSim.Grid.GridServer
341 switch (insertResponse) 343 switch (insertResponse)
342 { 344 {
343 case DataResponse.RESPONSE_OK: 345 case DataResponse.RESPONSE_OK:
344 m_log.Info("[grid]: New sim " + (existingSim == null ? "creation" : "connection") + " successful: " + sim.regionName); 346 m_log.Info("[LOGIN END]: " + (existingSim == null ? "New" : "Existing") + " sim login successful: " + sim.regionName);
345 break; 347 break;
346 case DataResponse.RESPONSE_ERROR: 348 case DataResponse.RESPONSE_ERROR:
347 m_log.Warn("[storage]: New sim creation failed (Error): " + sim.regionName); 349 m_log.Warn("[LOGIN END]: Sim login failed (Error): " + sim.regionName);
348 break; 350 break;
349 case DataResponse.RESPONSE_INVALIDCREDENTIALS: 351 case DataResponse.RESPONSE_INVALIDCREDENTIALS:
350 m_log.Warn("[storage]: " + 352 m_log.Warn("[LOGIN END]: " +
351 "New sim creation failed (Invalid Credentials): " + sim.regionName); 353 "Sim login failed (Invalid Credentials): " + sim.regionName);
352 break; 354 break;
353 case DataResponse.RESPONSE_AUTHREQUIRED: 355 case DataResponse.RESPONSE_AUTHREQUIRED:
354 m_log.Warn("[storage]: " + 356 m_log.Warn("[LOGIN END]: " +
355 "New sim creation failed (Authentication Required): " + 357 "Sim login failed (Authentication Required): " +
356 sim.regionName); 358 sim.regionName);
357 break; 359 break;
358 } 360 }
359 } 361 }
360 catch (Exception e) 362 catch (Exception e)
361 { 363 {
362 m_log.Warn("[storage]: " + 364 m_log.Warn("[LOGIN END]: " +
363 "Unable to add region " + sim.UUID.ToString() + " via " + kvp.Key); 365 "Unable to login region " + sim.UUID.ToString() + " via " + kvp.Key);
364 m_log.Warn("[storage]: " + e.ToString()); 366 m_log.Warn("[LOGIN END]: " + e.ToString());
365 } 367 }
366 } 368 }
367 369
@@ -373,24 +375,26 @@ namespace OpenSim.Grid.GridServer
373 { 375 {
374 if (existingSim == null) 376 if (existingSim == null)
375 { 377 {
376 m_log.Warn("[grid]: Authentication failed when trying to add new region " + sim.regionName + 378 m_log.WarnFormat(
377 " at location " + sim.regionLocX + 379 "[LOGIN END]: Authentication failed when trying to login new region {0} at location {1} {2}"
378 " " + sim.regionLocY + " with TheSim.regionRecvKey " + sim.regionRecvKey + "(" + Config.SimSendKey + ") and TheSim.regionRecvKey " + sim.regionSendKey + "(" + Config.SimRecvKey + ") "); 380 + " with TheSim.regionSendKey {3} (expected {4}) and TheSim.regionRecvKey {5} (expected {6})",
381 sim.regionName, sim.regionLocX, sim.regionLocY,
382 sim.regionSendKey, Config.SimRecvKey, sim.regionRecvKey, Config.SimSendKey);
379 } 383 }
380 else 384 else
381 { 385 {
382 m_log.Warn("[grid]: Authentication failed when trying to add new region " + sim.regionName + 386 m_log.Warn("[LOGIN END]: Authentication failed when trying to login region " + sim.regionName +
383 " at location " + sim.regionLocX + 387 " at location " + sim.regionLocX +
384 " " + sim.regionLocY + " currently occupied by " + existingSim.regionName); 388 " " + sim.regionLocY + " currently occupied by " + existingSim.regionName);
385 } 389 }
386 390
387 return ErrorResponse("The key required to connect to your region did not match. Please check your send and recieve keys."); 391 return ErrorResponse("The key required to login your region did not match. Please check your send and receive keys.");
388 } 392 }
389 } 393 }
390 else 394 else
391 { 395 {
392 m_log.Warn("[grid]: Failed to add new region " + sim.regionName + " at location " + sim.regionLocX + " " + sim.regionLocY + " currently occupied by " + existingSim.regionName); 396 m_log.Warn("[LOGIN END]: Failed to login region " + sim.regionName + " at location " + sim.regionLocX + " " + sim.regionLocY + " currently occupied by " + existingSim.regionName);
393 return ErrorResponse("Another region already exists at that location. Try another"); 397 return ErrorResponse("Another region already exists at that location. Please try another.");
394 } 398 }
395 } 399 }
396 400
@@ -537,8 +541,7 @@ namespace OpenSim.Grid.GridServer
537 else 541 else
538 { 542 {
539 sim.regionSecret = Config.SimRecvKey; 543 sim.regionSecret = Config.SimRecvKey;
540 } 544 }
541
542 545
543 sim.regionDataURI = String.Empty; 546 sim.regionDataURI = String.Empty;
544 sim.regionAssetURI = Config.DefaultAssetServer; 547 sim.regionAssetURI = Config.DefaultAssetServer;
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index ec26d9d..d910dc4 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -655,6 +655,11 @@ namespace OpenSim
655 return GetPhysicsScene(m_physicsEngine, m_meshEngineName); 655 return GetPhysicsScene(m_physicsEngine, m_meshEngineName);
656 } 656 }
657 657
658 /// <summary>
659 /// Handler to supply the current status of this sim
660 ///
661 /// Currently this is always OK if the simulator is still listening for connections on its HTTP service
662 /// </summary>
658 protected class SimStatusHandler : IStreamedRequestHandler 663 protected class SimStatusHandler : IStreamedRequestHandler
659 { 664 {
660 public byte[] Handle(string path, Stream request) 665 public byte[] Handle(string path, Stream request)