aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Grid
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServiceConnector.cs42
1 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
index a1ca58e..7c8a3e2 100644
--- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs
@@ -564,7 +564,47 @@ namespace OpenSim.Services.Connectors
564 564
565 public int GetRegionFlags(UUID scopeID, UUID regionID) 565 public int GetRegionFlags(UUID scopeID, UUID regionID)
566 { 566 {
567 return 0; 567 Dictionary<string, object> sendData = new Dictionary<string, object>();
568
569 sendData["SCOPEID"] = scopeID.ToString();
570 sendData["REGIONID"] = regionID.ToString();
571
572 sendData["METHOD"] = "get_region_flags";
573
574 string reply = string.Empty;
575 try
576 {
577 reply = SynchronousRestFormsRequester.MakeRequest("POST",
578 m_ServerURI + "/grid",
579 ServerUtils.BuildQueryString(sendData));
580 }
581 catch (Exception e)
582 {
583 m_log.DebugFormat("[GRID CONNECTOR]: Exception when contacting grid server: {0}", e.Message);
584 return -1;
585 }
586
587 int flags = -1;
588
589 if (reply != string.Empty)
590 {
591 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);
592
593 if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null))
594 {
595 Int32.TryParse((string)replyData["result"], out flags);
596 //else
597 // m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received wrong type {2}",
598 // scopeID, regionID, replyData["result"].GetType());
599 }
600 else
601 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags {0}, {1} received null response",
602 scopeID, regionID);
603 }
604 else
605 m_log.DebugFormat("[GRID CONNECTOR]: GetRegionFlags received null reply");
606
607 return flags;
568 } 608 }
569 609
570 #endregion 610 #endregion