aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Grid
diff options
context:
space:
mode:
authorDiva Canto2010-01-29 09:12:22 -0800
committerDiva Canto2010-01-29 09:12:22 -0800
commit0c81966c0a8f69474fb542d7b4df1780ef756519 (patch)
tree549973fd8c11ee8dd3eba939eb0605a28c6d2849 /OpenSim/Services/Connectors/Grid
parentFixed broken dll name. (diff)
downloadopensim-SC_OLD-0c81966c0a8f69474fb542d7b4df1780ef756519.zip
opensim-SC_OLD-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.gz
opensim-SC_OLD-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.bz2
opensim-SC_OLD-0c81966c0a8f69474fb542d7b4df1780ef756519.tar.xz
Works for grid login.
Diffstat (limited to 'OpenSim/Services/Connectors/Grid')
-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