diff options
author | Melanie | 2013-09-07 13:54:19 +0100 |
---|---|---|
committer | Melanie | 2013-09-07 13:54:19 +0100 |
commit | 2f365ea80be0df545a74da03afceb964da1546d1 (patch) | |
tree | a54202b1cdabaa201c0566232bde69cecdcfef6a /OpenSim/Services/Connectors/Grid | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.zip opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.gz opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.bz2 opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Services/Connectors/Grid')
-rw-r--r-- | OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index f982cc1..af91cdb 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs | |||
@@ -525,6 +525,57 @@ namespace OpenSim.Services.Connectors | |||
525 | return rinfos; | 525 | return rinfos; |
526 | } | 526 | } |
527 | 527 | ||
528 | public List<GridRegion> GetDefaultHypergridRegions(UUID scopeID) | ||
529 | { | ||
530 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
531 | |||
532 | sendData["SCOPEID"] = scopeID.ToString(); | ||
533 | |||
534 | sendData["METHOD"] = "get_default_hypergrid_regions"; | ||
535 | |||
536 | List<GridRegion> rinfos = new List<GridRegion>(); | ||
537 | string reply = string.Empty; | ||
538 | string uri = m_ServerURI + "/grid"; | ||
539 | try | ||
540 | { | ||
541 | reply = SynchronousRestFormsRequester.MakeRequest("POST", | ||
542 | uri, | ||
543 | ServerUtils.BuildQueryString(sendData)); | ||
544 | |||
545 | //m_log.DebugFormat("[GRID CONNECTOR]: reply was {0}", reply); | ||
546 | } | ||
547 | catch (Exception e) | ||
548 | { | ||
549 | m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server at {0}: {1}", uri, e.Message); | ||
550 | return rinfos; | ||
551 | } | ||
552 | |||
553 | if (reply != string.Empty) | ||
554 | { | ||
555 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); | ||
556 | |||
557 | if (replyData != null) | ||
558 | { | ||
559 | Dictionary<string, object>.ValueCollection rinfosList = replyData.Values; | ||
560 | foreach (object r in rinfosList) | ||
561 | { | ||
562 | if (r is Dictionary<string, object>) | ||
563 | { | ||
564 | GridRegion rinfo = new GridRegion((Dictionary<string, object>)r); | ||
565 | rinfos.Add(rinfo); | ||
566 | } | ||
567 | } | ||
568 | } | ||
569 | else | ||
570 | m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultHypergridRegions {0} received null response", | ||
571 | scopeID); | ||
572 | } | ||
573 | else | ||
574 | m_log.DebugFormat("[GRID CONNECTOR]: GetDefaultHypergridRegions received null reply"); | ||
575 | |||
576 | return rinfos; | ||
577 | } | ||
578 | |||
528 | public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y) | 579 | public List<GridRegion> GetFallbackRegions(UUID scopeID, int x, int y) |
529 | { | 580 | { |
530 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | 581 | Dictionary<string, object> sendData = new Dictionary<string, object>(); |