diff options
author | mingchen | 2007-06-26 17:50:27 +0000 |
---|---|---|
committer | mingchen | 2007-06-26 17:50:27 +0000 |
commit | 8ff1d0968ff3c4173b036398359ef62a356ad2b2 (patch) | |
tree | 46e740c18866096e1c4f03e4a42cf7e0c0a4539c /OpenGridServices/OpenGridServices.GridServer/GridManager.cs | |
parent | * Updated demo filter to show more common usage (as well as embedding multipl... (diff) | |
download | opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.zip opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.gz opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.bz2 opensim-SC-8ff1d0968ff3c4173b036398359ef62a356ad2b2.tar.xz |
*Added support for reservations in OpenGridServices (mysql only for now)
*SQL file coming soon (as soon as I can figure out how to get the
Diffstat (limited to '')
-rw-r--r-- | OpenGridServices/OpenGridServices.GridServer/GridManager.cs | 26 |
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 | { |