aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGridServices/OpenGridServices.GridServer/GridManager.cs')
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/GridManager.cs26
1 files changed, 18 insertions, 8 deletions
diff --git a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
index cfbf591..bf80652 100644
--- a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
+++ b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
@@ -392,11 +392,11 @@ namespace OpenGridServices.GridServer
392 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString(); 392 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
393 393
394 // For Sugilite compatibility 394 // For Sugilite compatibility
395 simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString(); 395 simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
396 simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString(); 396 simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
397 simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); 397 simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
398 simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); 398 simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
399 simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); 399 simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
400 400
401 simProfileList.Add(simProfileBlock); 401 simProfileList.Add(simProfileBlock);
402 } 402 }
@@ -561,6 +561,7 @@ namespace OpenGridServices.GridServer
561 return "ERROR! Servers must register with public addresses."; 561 return "ERROR! Servers must register with public addresses.";
562 } 562 }
563 563
564
564 try 565 try
565 { 566 {
566 OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); 567 OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
@@ -568,9 +569,18 @@ namespace OpenGridServices.GridServer
568 { 569 {
569 try 570 try
570 { 571 {
571 kvp.Value.AddProfile(TheSim); 572 //Check reservations
572 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); 573 ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY);
573 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); 574 if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null))
575 {
576 kvp.Value.AddProfile(TheSim);
577 OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
578 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
579 }
580 else
581 {
582 return "Unable to update region (RestSetSimMethod): Incorrect auth key.";
583 }
574 } 584 }
575 catch (Exception e) 585 catch (Exception e)
576 { 586 {